Command-line edit of Word doc

K

kwinieck

Is there a command-line tool that I can run to update a Word doc? I
want to replace one word "%Revision%" in a .doc file with a revision
number generated automatically by our version management tool (Serena
Version Manager).
 
C

Cindy M -WordMVP-

Is there a command-line tool that I can run to update a Word doc? I
want to replace one word "%Revision%" in a .doc file with a revision
number generated automatically by our version management tool (Serena
Version Manager).
No, there are no commandline switches that will perform actions in a
document. You'd need to automate Word, open the document and make the
changes.

If the files were saved in RTF or HTML format you could conceivably
write a program that could parse and edit the content without opening
the file in WORD.

Another possibility would be to create a document property to contain
the Revision information. Use DocProperty fields to display it
throughout the document. Then, using dsofile.exe, a program could
change the document property without opening the file in Word.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :)
 
K

kwinieck

Thanks for the idea about properties and dsofile.exe. I searched google
for dsofile.exe, but only found dsofile.dll. Where to get dsofile.exe?
I don't know how to program in Visual Basic, etc. to use a .dll.
Ken Winiecki
 
K

kwinieck

Thanks for the idea about properties and dsofile.exe. I searched google
for dsofile.exe, but only found dsofile.dll. Where to get dsofile.exe?
I don't know how to program in Visual Basic, etc. to use a .dll.
Ken Winiecki
 
C

Cindy M -WordMVP-

Thanks for the idea about properties and dsofile.exe. I searched google
for dsofile.exe, but only found dsofile.dll. Where to get dsofile.exe?
I don't know how to program in Visual Basic, etc. to use a .dll.
See here, first (you need to scroll down)

http://support.microsoft.com/default.aspx?scid=kb;en-us;253338

And I think you'll find an article at word.mvps.org (by Jonathan West, as
I recall) about using it. It is a DLL, but you can use it via VBA (Word
macro), as well. But if you don't have any programming background, then
you're going to need to find (hire) someone to do it for you.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
K

kwinieck

Graham: Thank you for the info. Assuming I can create the VBA macro in
Word, I don't know how to run that from the command line, i.e., it
would seem I still must open Word and run interactively. Any advice on
how to run it from command line?
 
G

Graham Mayor

Your message was appended to the wrong part of the thread, which will no
doubt confuse Cindy ;)
You can run the macro from the command line winword /mmacroname
Word will open to run the macro.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
C

Cindy M -WordMVP-

Hi Graham,
Your message was appended to the wrong part of the thread, which will no
doubt confuse Cindy ;)
It did <g> But I figured you'd probably see it and know what was meant!

Cindy Meister
 

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