Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening Word MAXIMIZED, using an excel Macro.

Status
Not open for further replies.

danno28

Programmer
Sep 5, 2002
8
GB
I am opening a Word document from Excel, and would like it to open with Word maximised. This is my code so far:

Dim myWord As Object
Set myWord = CreateObject("Word.Application")
myWord.Visible = True
myWord.Documents.Open FileName:="C\IntTrainTemplate.doc", ReadOnly:=True
With myWord

..do stuff..

End With

 
Try early binding (note the declaration of myWord). This will enable you to get dropdown lists of methods and properties as you type.
Code:
    Dim myWord As Word.Application
    Set myWord = CreateObject("Word.Application")
    myWord.Visible = True
    myWord.Documents.Open FileName:="C\IntTrainTemplate.doc", ReadOnly:=True
    myWord.WindowState = wdWindowStateMaximize
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top