Hi,
I am trying to open a word doc using vba. I have a code that will open the file, but the file does not appear ontop. I would like the word doc to be on the screen after the code runs.
This is what i have:
Sub OpenDocFromExcel()
Dim wordapp
Dim strFile As String
strFile = "C:\Users\barteam.FRASER-AS\Desktop\Questions for cable machine.docx"
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open strFile
wordapp.Visible = True
End Sub
Any help is much appreciated
I am trying to open a word doc using vba. I have a code that will open the file, but the file does not appear ontop. I would like the word doc to be on the screen after the code runs.
This is what i have:
Sub OpenDocFromExcel()
Dim wordapp
Dim strFile As String
strFile = "C:\Users\barteam.FRASER-AS\Desktop\Questions for cable machine.docx"
Set wordapp = CreateObject("word.Application")
wordapp.documents.Open strFile
wordapp.Visible = True
End Sub
Any help is much appreciated