New
#1
Problem with Excel macro to open Word files
I am having a problem with an Excel macro which opens Word files. The macro opens the files OK but sometimes the file is not visible; instead, it is hidden in the window behind the Excel Workbook and the Word icon on the taskbar flashes to show that the file is open. I want the Word file to appear visible on-screen automatically without my having to click on the taskbar.
The relevant part of the macro is:
Set objWord = CreateObject("Word.Application")
With objWord
.Documents.Open DocsFullPath(i)
.Visible = True
.Activate
.Application.WindowState = 1
.ActiveWindow.ActivePane.View.Zoom.Percentage = 100
End With
GoTo Finish
Can anyone help me resolve this? It's been driving me mad!