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

VBS: Write to Word2003 Doc / Search and Replace in a Doc

Status
Not open for further replies.

sa5cha

Programmer
May 29, 2001
34
DE
Hi,

can someone help me and paste some lines on how to manipulate a word 2003 document via vbs ?

I Need to update 3k documents - text and document properties :-(

I can't find anything, cant believe it. I just need a quick info on how.

Sascha
 
What properties do you need to change?

This thread might get you started: thread329-1630755
 
Hi jges,

thank you for the link, it looks good ill have a try.

Thank you.

Sascha
 
Hi jges,

nice the link you have posted works, and solves much of my problems.

But I still got two issues:

Do you have any ideas on how to read/write word properties like the document title for example ?


I need a function like instr which returns me the position of the searched word, because I must clear a random string which is framed between two Keywords. And of course replace that random string with the new string .

Greetings Sascha
 
The find and replace code can be modified to meet your needs. Can you post an example of what you would like to search and replace?

You should be able to read/write any properties that you have permission to. However, I don't see title listed as an available property in the Word.Document object model (at least not in Word 2007 that I'm using).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top