Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE

Generating MS Word documents is not working

Generating MS Word documents is not working


I am trying to generate MS Word documents but the generation is not working, what's the issue?


Optimal Trace has a powerful document generation facility allowing for rapid creation of MS Word documentation.

If you are having difficulty generating however there are a number of things you should check for:

1. Optimal Trace needs to know which version of MS Word is installed on your system. By default when you install Optimal Trace this setting is Word 2000. Optimal Trace also supports Word 2003 and Word 2007. Make sure the version set in Optimal Trace corresponds to the version installed on your machine.

Adjust this setting in the Optimal Trace menu item: 'Options->General Options'

2. When you generate Microsoft Office Word 2000 and 2003 documents, you should set the following options in your copy of Microsoft Office Word.  Click OK to apply the settings.

* Click Tools>Macro>Security to open the Macro Security dialog box.

* Select either Low or Medium security level.

* On the Trusted Sources tab, select both the Trust access to Visual Basic Project and Trust All Installed Add-Ins And Templates checkboxes.

Before generating Microsoft Office Word 2007 documents, you must configure Microsoft Office Word 2007 as follows:  

* Click Office button>Word Options, click Save. The Save As dialog box appears. From the Save as type list, select Word Macro-Enabled Document Format (.docm).

* Click Office button>Word Options>Trust Center>Trust Center Settings>Trusted Locations, and then add \docgen\vba as a new trusted location.

* Click Office button>Word Options>Trust Center>Trust Center Settings>Macro Settings, and select Disable all macros except digitally signed macros and Trust access to the VBA project object model .

* Click Office button>Word Options>Trust Center>Trust Center Settings>Macro Settings. Under Developer Macro Settings, select the Disable all macros except digitally signed macros box.

NOTE: You should check that there are no winword processes running prior to making this setting. If a previous winword process is alive and you launch word again applying these settings can have no effect.

3. In many cases where issues are encountered, these can be traced back to rogue Word processes that have not been shut down. Ensure that all such processes are shut down prior to document generation. To see how many 'WinWord' processes you have currently running look at the 'Processes' tab in the Task Manager. For each process right click on it and hit the 'End Process' option.

NOTE: Outlook can have it's own copy of Word running (resulting in a winword process), see next point for details.

4. Outlook can have it's own copy of Word running (resulting in a winword process). If you find that killing the processes is not working it is wise to check if Outlook is running. In this case Shut Outlook down, reboot, change the macro security settings then reboot again. The settings should now be saved correctly.

In general we would recommend not using Word as the editor in Outlook as it causes conflicts with 'normal' Word preventing generation.

5. Optimal Trace needs Microsoft Scripting to be installed. Normally this component is installed by Word itself, or by other Microsoft products such as Internet Explorer. However there have been cases where it was later deinstalled, or unavailable for other reasons, and then Optimal Trace docgen will not work.

A typical error message seen in this situation is "ActiveX component can't create object". A quick test for checking whether scripting support is installed is to look for the files scrrun.dll and vbscript.dll in your system32 directory. Even if you do find these libraries it is possible that they may not be correctly registered.

To remedy this situation re-install the scripting libraries from Microsoft. The install process also correctly registers the libraries.

The Microsoft scripting libraries can be quickly downloaded and installed from here:

Windows Script 5.6 for Windows XP and Windows 2000

Try the following steps to remedy it.

Launch Word, then press Alt-F11 to launch Visual Basic, and uncheck the option

Tools->Options->Require Variable Declaration, if it is checked. Exit VB

Tools->Options->and Word

and try the generate again.

If that didn't work, then check whether the profile you are using during generation is in the standard location (/docgen/profiles/). It is recommended that all Optimal Trace profiles are stored in this location.

It's also possible that an unusual Word configuration, of global (autoloaded) templates and the like, is interfering with the Optimal Trace document generation process.

If this problem still refuses to go away, it's worth trying the following before contacting Optimal Trace support.

Launch Word and select Tools->Templates And Add-Ins and see what, if anything, lies under the 'Global Templates and Add-Ins' section. If something is there, try removing it and restarting Word. If it reappeared, it's probably being auto-loaded from the Word Startup folder. In that case, click Tools->Options->File Locations->Startup->Modify, and move the contents of the folder to some temporary location. Then shut down and restart Word, (check Task Manager for any outstanding winword.exe's) and try generating through Optimal Trace again.

If all of the preceding steps fail, undo the changes you have just carried out and contact Optimal Trace support for assistance, as the problem is something new and has not been logged to date.

7. In cases where updates or generation is failing, this can be isolated to a setting in word associated with background saves. If you see problems, try un-checking this option in Word. To do this, in Word go to the Tools>>Options menu and select the 'save' tab, then uncheck the 'Allow Background Saves' setting.

8. Versions:

Optimal Trace explicity supports the following versions of MS-Word.

Word 2007 (12..0.6350.5000)

Word 2003 (11.5604.5606)

Word 2000 (9.0.3821) SR-1

Optimal Trace has ran successfully on other minor versions of Word, without any problems being reported. For instance, Optimal Trace has been run without problems on all versions of Word 2000 (plain Word 2000, and with service packs 1, 2, and 3 installed). However, the above versions are those that are officially certified by Optimal Trace. If you have tried all the other checks mentioned so far and the generation is still causing an issue then upgrading to one of the above service pack releases from the Microsoft site is worthwhile.

9. When you have generated documents and are reviewing them in MS Word, you may notice that the appearance of the document is correct in MS Word onscreen however the print out (or Print Preview view) is full of 'strange' or 'XML' looking text.

This is due to an MS Word setting associated with Hidden Test. To rectify this, launch Word, Tools->Options->Print, deselect 'hidden text' from the "Include when printing document" pane.

Old KB# 10325


Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Version history
Revision #:
1 of 1
Last update:
‎2013-02-15 17:40
Updated by:
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.