I have a project that uses the freeware program PDF Creator to generate a PDF from a report.
Normally, all our workstatioins have PDF Creator installed, but if this is not the case, VBA starts acting out.
PDF creation is not mandatory for the program, I also export a Excel copy, but I rather have both.
What I want to do is the following:
- When the program starts, detect if PDF Creator is installed and if it is referenced in VBA
- When not installed, remove the reference to PDF Creator and set a public variable, so the program 'knows' PDF Creator is not present. In the code I can then prevent PDF's form being created.
- When installed and not referenced, relink the reference
I have found a piece of code on this forum to check and detach missing references. The problem there is that if a reference is missing, an error is generated when accessing the Name property of the reference. So there is no way to know if the missing reference is indeed PDF Creator or some other reference.
Does anyone have ideas how to solve this?
Normally, all our workstatioins have PDF Creator installed, but if this is not the case, VBA starts acting out.
PDF creation is not mandatory for the program, I also export a Excel copy, but I rather have both.
What I want to do is the following:
- When the program starts, detect if PDF Creator is installed and if it is referenced in VBA
- When not installed, remove the reference to PDF Creator and set a public variable, so the program 'knows' PDF Creator is not present. In the code I can then prevent PDF's form being created.
- When installed and not referenced, relink the reference
I have found a piece of code on this forum to check and detach missing references. The problem there is that if a reference is missing, an error is generated when accessing the Name property of the reference. So there is no way to know if the missing reference is indeed PDF Creator or some other reference.
Does anyone have ideas how to solve this?