Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / November 2004

Tip: Looking for answers? Try searching our database.

Starting Word from cmd

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cjobes - 26 Nov 2004 17:46 GMT
Hi all,

I need to start Word from cmd supplying a merge template and and imput file.
Is it possible to submit those parameters so Word will start and
automatically perform the merge without user intervention?

Thanks,
Claus
Peter Jamieson - 26 Nov 2004 19:30 GMT
Word understands a number of command line options, but not "an input file".
So you will need to write some Word VBA that grabs the command line from
Windows (e.g. using a win32 routine) and gets the file pathname and anything
else you need, and proceed from there.

Peter Jamieson.

> Hi all,
>
[quoted text clipped - 5 lines]
> Thanks,
> Claus
cjobes - 26 Nov 2004 22:10 GMT
Peter,

Are you talking about a macro? Where do I find information about the command
line options?

Claus
> Word understands a number of command line options, but not "an input file".
> So you will need to write some Word VBA that grabs the command line from
[quoted text clipped - 12 lines]
> > Thanks,
> > Claus
Peter Jamieson - 27 Nov 2004 09:48 GMT
> Are you talking about a macro?

Yes, but.

> Where do I find information about the command
> line options?

For the options Word 2003 recognises, look up "Customizing how Word starts"
in Word Help. "Starting Word" may work in earlier versions. You will
probably need to use /ttemplatename. Then you will need to avoid using
anything else Word recognises. You cannot use the VBA Command() function to
get the command line because it doesn't work in Office programs, so you have
to use Win32. You should find some useful code by searching Google Groups
for, e.g. get microsoft word command line will rickards

Peter Jamieson

> Peter,
>
[quoted text clipped - 21 lines]
>> > Thanks,
>> > Claus
cjobes - 27 Nov 2004 15:27 GMT
Thanks,

I'm shelling out with Proc() from .Net. I just don't have any experience
with WORD. Will do the search and see what I come up with.

Claus
> > Are you talking about a macro?
>
[quoted text clipped - 38 lines]
> >> > Thanks,
> >> > Claus
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.