Adding word files

M

Marco

I'm using xslt and xsd files to merge data coming from Dynamics CRM to a word
2003 xml file. It works fine, and after merging information I get a word xml
file with everything set.
Now I need, depending on some information I retrieve, to add one or more
word file at the end of my document (these files contain technical
information on the product I added before).
What's the best way to do that?
How can I add several word files to my main document?
Thanks for your help
Marco
 
P

Pesach Shelnitz

Hi Marco,

For each Word file that you want to insert at the end of doc, add a line
like the following.

ActiveDocument.Bookmarks("\EndOfDoc").Range.InsertFile _
fileName:="C:\MyPath\MyFile.docx"

In each case, replace "C:\MyPath\MyFile.docx" by the actual full path and
file name.
 
M

Marco

It worked fine.
Thank's a lot
Marco

Pesach Shelnitz said:
Hi Marco,

For each Word file that you want to insert at the end of doc, add a line
like the following.

ActiveDocument.Bookmarks("\EndOfDoc").Range.InsertFile _
fileName:="C:\MyPath\MyFile.docx"

In each case, replace "C:\MyPath\MyFile.docx" by the actual full path and
file name.
 

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