I'm using the latest version of Aspose.Words for Java (Aspose.Words.jdk16.jar).
I would like to create a new word document (doc-file) based on a word template (dot-file), then to insert the contents of some other doc-files into the new doc-file using destination styles and in the end to save the target document.
In the footer of the dot-File is an "Author"-field included, where I would like to have the current user's name replaced. I know that updating fields is not covered by Aspose, so I have added an AutoOpen Marcro in the dot-file that should update the fields every time the doc-file is opened.
For creating the doc-file and so on this I have in essence written the following code:
Document worddoc = new Document(dotTemplate);
InsertDocument using NodeImporter class with importFormatMode "USE_DESTINATION_STYLES"
dotTemplate and targetDoc are parameters for path+filename information.
Everything works fine excepting the filling of the "Author" field (other fields, e.g. for filename, etc. were filled correctly!)
The normal word behavior is that when creating a new document the "Author" field in the footer is first filled by the "name" that is inserted in the user information (Tools - Options) and is automatically copied to the Author field of the file properties.
Another fact is that the mentioned template in the file properties is normally the dot-file the doc-file was created from.
With my Aspose solution I have a different behavior:
1. the automatic transfer from the user information (name) to the file properties (author) seems not to work, because the author field in the file properties is empty and the author field in my footer the same
2. the template mentioned in the file properties is not the dot-file that I have basically used for creating the new document, but "Normal.dot"
I hope you can understand my problem!?
Is this problem known?
Thanks for your support in advance.