Reply
 
Thread Tools Display Modes
  #1   Report Post  
cjobes
 
Posts: n/a
Default Starting Word from cmd

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


  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

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.


"cjobes" wrote in message
...
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




  #3   Report Post  
cjobes
 
Posts: n/a
Default

Peter,

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

Claus
"Peter Jamieson" wrote in message
...
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.


"cjobes" wrote in message
...
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






  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

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

"cjobes" wrote in message
...
Peter,

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

Claus
"Peter Jamieson" wrote in message
...
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.


"cjobes" wrote in message
...
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








  #5   Report Post  
cjobes
 
Posts: n/a
Default

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
"Peter Jamieson" wrote in message
...
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

"cjobes" wrote in message
...
Peter,

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

Claus
"Peter Jamieson" wrote in message
...
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.


"cjobes" wrote in message
...
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










Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I divide a page into three sections? Bonnie Microsoft Word Help 3 May 8th 23 02:47 AM
word xp crashes after macros are recorded kharris0405 Microsoft Word Help 3 January 11th 05 10:50 PM
WordPerfect - copying formatting Morgan Page Layout 1 January 10th 05 05:00 PM
Continuous breaks convert to next page breaks Jennifer Hunt Microsoft Word Help 2 December 30th 04 05:45 PM
macro in word js Microsoft Word Help 1 December 28th 04 03:01 AM


All times are GMT +1. The time now is 12:05 PM.

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright 2004-2023 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"