I use Word to create HTM files for use with PowerShell in emailing reports. I use word to make it look "pretty" and then use custom tags in the HTM file to replace with key variables from the script, then use the HTM file as the "body" of the email.
When I save the HTM file with word, it creates a whole bunch of seperate XML files that are associated with the main HTM file and stores them in a seperate directory at the same level as the HTM file. For example if my file is called "emailtemplate.htm" it creates a folder called "emailtemplate_files" and puts all those XML files in there.
This has not really been a problem, but now I want my script to be self updating for my users - so if I update the HTM file at the source, the script does some logic testing when it is run and will copy the new HTM file out to the users directory from where they run a copy of the script. However, my code is only copying the HTM file - it does not know about the linked XML files and they get skipped.
I am wondering if it is possible to embed all the data in those XML files directly into the HTM file so that I have just ONE file I need to update instead of accounting for all the extra files and directory. Does any one know how to make Word use just ONE file for the HTM content instead of using all the seperate linked XML files? I am using Office 2010.
Thanks,
NK