|
-
Jul 14th, 2009, 10:24 AM
#1
Thread Starter
New Member
[RESOLVED] Opening a word document via VBA
Hello
I am looking for help with a VBA macro I am writing in Excel. Basically I want to open a word document from inside an excel macro. I have tried:
Sub open1()
MsgBox "This form should be printed and taken to your local IT contact" & Chr(10) & Chr(10) & "Do not email this form to the team.", vbexclaimation, "L1"
On Error GoTo BadShow
Dim oWord As Object
Set oWord = CreateObject("Word.application")
oWord.Documents.Open "\\server\path\myfolder\forms\L1.doc"
oWord.Visible = True
AppActivate oWord
Set oWord = Nothing
Exit Sub
BadShow:
oWord.Quit
Set oWord = Nothing
End Sub
That I found by using google, but my document opens and instantly closes. I am a bit of a novice with these things so any help would be greatly appreciated
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
|