I've set up a Word template using bookmarks to populate the test data. The created file is then saved to a specific folder and file based on UUT parameters. The report generation works perfectly on the development system, both in the development mode and when running the entire test system as an exe. The system is set to open the document with the fields populated, automatically save to PDF and then close (for now, for troubleshooting I have it as "OpenAfterExport".
Fast forward to installing it on the customer computer. The testing is all processed correctly, but when Word is called and the template opens, there is no data being populated and the PDF is not saved.
I think it's a permissions issue with Word on the client's computer. Has anyone run into anything like this?
Attached is a snippit of a portion of bookmark data population and the word nodes being used.
I have not run into this issue before... I have however had great luck performing the exact same task using PDFs directly. It is reliable and doesn't require MS Word to be installed on the customer's PC. You take a PDF, add acrofields that can be populated with values and save it. The report generation then just opens the PDF, fills in the blanks, flattens it (makes the blanks not editable) and saves it as a new file.
If you are interested, I'd start with Exaprom PDF report generator.
In addition, I have attached the 2 main VIs I use to accomplish this task. The first one, "Read AcroFields.vi" returns a list of all of the current tags or blanks in the PDF that can be populated. The second VI, "Stamp PDF.vi" takes all of the tags and corresponding strings and creates / flattens the new PDF.
Sometimes, when opening Word documents, you'll get a message about Enable Editing. It's called Protected View. I'm not sure what prompts that message to appear. Maybe it's that the computer it was created on doesn't match the one it's being opened. If that is the case, maybe this message is blocking your EXE from making changings and printing a PDF. In Word -> Options -> Trust Center, there are settings for ActiveX or you can trust specific documents. Hope this helps.
Well, after much angst, it turns out that the customer's version of Word was one step behind my build; same major version. It was the third stamp down, that's how minor the change was. My version is Word 2010, we decided to try 2013 on their machine. The reports worked perfectly.
Thanks for all of the suggestions.
It is the Property node Key there... it just returns the string name of the AcroField.