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
--
Message posted from http://www.ExcelForum.com
Harold - 10 Oct 2004 22:41 GMT
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

Signature
Harold Kless, MCSD
Support Professional
Microsoft Technical Support for Business Applications
haroldk@microsoft.com
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
> Hi
>
[quoted text clipped - 21 lines]
> ---
> Message posted from http://www.ExcelForum.com/
Steve Rindsberg - 04 Nov 2004 19:56 GMT
> Hi
>
[quoted text clipped - 14 lines]
>
> 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

Signature
--
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
================================================