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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

passing named arguments to MS Word?

Status
Not open for further replies.

Dav136

Technical User
Oct 3, 2003
21
0
0
AT
I couldnt find a way to pass named parameters to Word, eg. equivalent to this command:

Selection.HomeKey Unit:=wdStory, Extend:=wdMove

Is this possible?

All input appreciated,

Dav

 
VBScript don't allow named parameters, only positional.
So, this VBA syntax:
Selection.HomeKey Unit:=wdStory, Extend:=wdMove
may be replaced in VBS by something like this:
yourWordAppObj.Selection.HomeKey 6, 0 'wdStory, wdMove


Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
Thanks, would have been to nice, I suppose.

Dav
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top