open word document

G

gbgkille69

I'm looking for a way to open a word document from a script with a
predfined window size (e.g. 300 X 400 pixels) and a viewing size of
e.g. 75%

is that possible by command line or vbs script? and if so how?
 
S

Steve Yandl

If you're sharing this script with other users, be mindful that this sort of
thing can make people grumpy. The following vbs will do what you want.

Set objWd = CreateObject("Word.Application")
With objWd
..Visible = True
..Documents.Add
..Height = 300
..Width = 400
..ActiveWindow.ActivePane.View.Zoom.Percentage = 75
End With


Steve Yandl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top