Detecting Different Versions + macro

P

Preet

Hi

I am writing a macro in Word, the document brings up a prompt to sav
as PDF, hence it chooses the printer option "Acrobat Distiller".

But not all my users will have that particular version of Distille
they may have version 5/6, version 5 is labelled "Acrobat Distiller
and version 6 is labelled as "Adobe PDF"

At the moment I have

ActivePrinter= "Acrobat Distiller"

but I want something on the lines of:

ActivePrinter= "Acrobat Distiller" or "Adobe PDF"

How do I do this?

I would really appreciate any help, and THANK YOU in advance!

Preet
 
H

Harold

I would suggest that you set the activeprinter to one of the choices and if
that fails set it to the other one.
Something like this:
Sub setprint()
On Error GoTo erroH
ActivePrinter = "Acrobat Distiller"
Exit Sub
erroH:
If Err.Number = 5216 Then
ActivePrinter = "Adobe PDF"
End If
End Sub
 
S

Steve Rindsberg

Hi

I am writing a macro in Word, the document brings up a prompt to save
as PDF, hence it chooses the printer option "Acrobat Distiller".

But not all my users will have that particular version of Distiller
they may have version 5/6, version 5 is labelled "Acrobat Distiller"
and version 6 is labelled as "Adobe PDF"

At the moment I have

ActivePrinter= "Acrobat Distiller"

but I want something on the lines of:

ActivePrinter= "Acrobat Distiller" or "Adobe PDF"

How do I do this?

Harold's solution's nice and simple. If you want to get a bit fancier, you
could use WinAPI code to enumerate the printers on the system and look in the
list for any that meet your needs. For example, you might also be able to use
one of the other third-party drivers like Jaws PDF et al.

I'm pretty sure you can find the code you need on Randy Birch's VBNet site.
www.mvps.org/vbnet




--
Steve Rindsberg, PPT MVP
PPT FAQ: www.pptfaq.com
PPTools: www.pptools.com
================================================
Apologies for the delayed response.
Just back from PowerPoint Live 2004
Had a great time, learned a lot
================================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top