You are visitor number since 2 October 2004.
Go to Howard Kaikow's home page
Date: 2 October 2004
From: Howard Kaikow <kaikow@standards.com>
Subject: PDFMaker appears to cause problems when using Microsoft Word macros
PDFMaker appears to cause problems when I run certain types of Microsoft Word macros. This example demonstrates how to replicate an instance of a particular problem. The details of the problem are described by comments within the code.
Since posting the example, I have noticed yet another error that occurs when PDFMaker.dot is loaded as a global template.
Place the PDFMakerProblem.dot template in Microsoft Word's StartUp directory.
Start Microsoft Word with a blank document attached to the Normal template.
Run the macro in the PDFMakerProblem.dot template loaded in the StartUp directory.
Exit from Microsoft Word.
This results in a Type 13: Type mismatch error.
Restart Microsoft Word, and unload PDFMaker.dot before repeating the above steps.
Exiting from Microsoft Word now produces no error.
I have noticed that I can avoid the errors by doing the following:
Allow PDFMaker.dot to be loaded prior to my running my macro.
Unloading PDFMaker.dot AFTER I run the macro.
Exit from Microsoft Word. No error occurs, implying that PDFMaker is doing something naughty, as yet unknown (to me), at Exit.
So the interim solution is to include an AutoExit macro such as the following in my Normal template.
Public Sub AutoExit() Dim addinTemp As AddIn On Error Resume Next Set addinTemp = AddIns("PDFMaker.dot") If Err.Number = 0 Then addinTemp.Installed = False End If On Error GoTo 0 On Error Resume Next Set addinTemp = AddIns("PDFMakerA.dot") If Err.Number = 0 Then addinTemp.Installed = False End If On Error GoTo 0 Set addinTemp = Nothing End Sub