Edit a word document based on a template

maddy_4213

New member
Joined
Feb 4, 2010
Messages
2
Programming Experience
1-3
Hi all,
I have a word template with two fields
Name : <enter ur name>
Ref.No :

the template name is test.docx

A user opens the template enters the name (but not ref.no) . He then selects Save As and saves with name abcd.doc

Now i have to use VB.NET to open the abcd.doc file and have to enter the value 100 against Ref.no.

I dont want to search for the text Ref.No : and replace it with Ref.No :100

I heard that we have to use something called tag concept to update this.
Can any one please help me in achieving this?

Thanks,
Madhu
 
It is easiest done inserting a Form Text Field, it will have a bookmark that you can look up with automation.
VB.NET:
doc.Bookmarks("Refno").Range.Text = "100"
doc is the Word.Document automation object, ask/search if you're not familiar with Office automation in VB.Net.
 
Back
Top