|
-
Aug 8th, 2000, 10:48 AM
#1
Thread Starter
New Member
Hey everyone,
I need a little bit of code help. When the user clicks on a command button, I want windows to launch a new word document. Any help?
Thanks in advance
Justin
-
Aug 8th, 2000, 11:04 AM
#2
Lively Member
Dim oWord As New Word.Application
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
oWord.Activate
-
Aug 8th, 2000, 11:08 AM
#3
Thread Starter
New Member
damonous
Thanks for the reply....Do I put that command in the button, or form load, or form activate. Thanks
Justin
-
Aug 8th, 2000, 11:13 AM
#4
Yes, put that into a CommandButton.
-
Aug 8th, 2000, 11:15 AM
#5
Thread Starter
New Member
-
Aug 8th, 2000, 11:32 AM
#6
Thread Starter
New Member
Sorry to be such a pain and I am trying to do this on my own, but I keep getting a user defined type error when I run the code.
Thanks again
Justin
Private Sub CmdItem_Click()
Dim oWord As New Word.Application
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
oWord.Activate
End Sub
-
Aug 8th, 2000, 11:51 AM
#7
Lively Member
Sorry, I forgot to mention that you need to reference the Word 8.0 Object Library.
Menu Path: Project > References
Then find the Microsoft Word 8.0 Library and check the box next to it. Press the "OK" button.
Enjoy.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|