1

I'm using xsl to pass variables to the CustomDocumentProperties of the Word 2003 Doc being generated in order to use VBA to make decisions based on those variables.

The file populates with the data as needed, but after the following command, the new file doesn't contain the CustomDocumentProperties that were set.

ActiveDocument.SaveAs2 FileName:=path, FileFormat:=wdFormatDocument

Is there a way to save the document without stripping the custom document properties?

Mathieu Guindon
  • 69,817
  • 8
  • 107
  • 235
McGinn
  • 61
  • 7
  • 2
    Interesting. Try a more privileged file format, like one that can contain macros (even though the document properties are probably stored elsewhere, just try it). – S Meaden Dec 21 '16 at 19:59
  • 2
    You're using Office 2010+ to save an Office 2003 document? (seems [SaveAs2 was introduced in Office 2010](http://stackoverflow.com/q/4107210/1188513)) – Mathieu Guindon Dec 21 '16 at 20:06
  • Yes I am, I'm using VBA injected into the XSL to generate the document with it. Then it performs actions and loads things based on the info. I'm open to better ways, but for the moment that's how it works. Everything is known to work with 2003 standards from the source, that's why. – McGinn Dec 22 '16 at 02:39

0 Answers0