I am filling a word template from vb and found the following example:
http://www.vbforums.com/showthread.p...late-from-.NET
My template looks like this:
<full name>
<postion>
<company>
I use the following code:
MyWord = CreateObject("Word.Application")
MyWord.Visible = True
MyWord.Documents.Open(file)
With MyWord
.ActiveDocument.Bookmarks("MIS_contact_fullname").Range.Text = "FullName"
.ActiveDocument.Bookmarks("MIS_contact_position").Range.Text = "Position"
End With
I end up with:
Position<company>
I was expecting:
FullName
Position
<company>
It appears that adding one field causes the previous field to be deleted.
I have tried adding a 'vbcrlf' but that doesn't help.
Any suggestions on what I'm doing wrong?
Thanks
http://www.vbforums.com/showthread.p...late-from-.NET
My template looks like this:
<full name>
<postion>
<company>
I use the following code:
MyWord = CreateObject("Word.Application")
MyWord.Visible = True
MyWord.Documents.Open(file)
With MyWord
.ActiveDocument.Bookmarks("MIS_contact_fullname").Range.Text = "FullName"
.ActiveDocument.Bookmarks("MIS_contact_position").Range.Text = "Position"
End With
I end up with:
Position<company>
I was expecting:
FullName
Position
<company>
It appears that adding one field causes the previous field to be deleted.
I have tried adding a 'vbcrlf' but that doesn't help.
Any suggestions on what I'm doing wrong?
Thanks