Replace text in a word.doc using C#

G

Gidi

Hi,

I've a template with word document which I enter text into, after each
insert i'm printing the document, then i want to change the text to different
text and print it again. I can't find how to replace the strings. (I know
which string i want to replace each time).

Thanks,
Gidi.
 
C

Cindy M.

Hi =?Utf-8?B?R2lkaQ==?=,
I've a template with word document which I enter text into, after each
insert i'm printing the document, then i want to change the text to different
text and print it again. I can't find how to replace the strings. (I know
which string i want to replace each time).
Look in the object model help for the Find property of the Selection and Range
objects for the basic syntax. You can specify the text to replace as a parameter
of the Execute method.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
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 :)
 
C

ChrisHarrington

Probably easier if you make the text you wish to change be a Word variable.
 

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