Macro detect different versions/ different names

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
 
S

Shauna Kelly

Hi Preet

See
How can I get a list of the available printer names?
http://www.word.mvps.org/FAQs/MacrosVBA/AvailablePrinters.htm

That will get you a list of all the installed printers. You could then cycle
through the array of printer names. If you find "Acrobat Distiller", then
set the ActivePrinter to that. If you find "Adobe PDF", set the printer to
that.

Post back if you need more help.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 
P

Preet

Hi Shauna

Thank you for your reply. Im not as such looking for the macro t
produce a list of printers, but instead for the macro to realise if th
user has a different version of Distiller, then open the version tha
the user has.

I dont want the user to be able to choose, I want the macro to choos
which the user should save in.

e.g. The User will only have 1 of the 2 different versions within ou
company, so it will either be:

"Acrobat Distiller" OR "Adobe PDF"

Is there no AND /OR that I can use in the macro, to say

Active Printer = "Acrobat Distiller" OR "Adobe PDF"
(whichever the macro can detect)

I hope this makes sense.

I would appreciate any more additional help

Thank you Shauna

Preet
 
S

Shauna Kelly

Hi Preet

No, there's no way to say "this printer" OR "that one". The only way I can
see to do this is for your code to get a list of all printers, cycle through
the code to find out which of your printers this user has, and then set the
ActivePrinter accordingly.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
 

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