Visio to PDF by Print menu to Acrobat Distiller Automation Problem

S

Shakil Mian

Hi all,

I'm trying to automate the creation of a Viso(2002) diagram to PDF(5).

Excel(2002)/VBA is used as a front-end and the mechanism to automate
the
above process on Win2K workstation.

I try to convert the viso diagram by progmatically changing the
default printer to Acrobat Distiller and then invoking Visio to print.
This is when automation fails as a Dialog box appears from visio
asking - "Save PDF file AS".

I have tried to manualy print from Visio to Acrobat Distiller and I
get no dialog box at all, very strange !!??

How can I tell Visio, Excel, Acrobat or the O/S to just save the pdf
without
displaying the dialog box.

Any help will be great.

Thanks,
Shakil Mian
 
A

al

you might check the recent note aobut "vba newbie" for
Kari Yli-Kuha's comment on the use of alertresponse. you
might also show the piece of code calling the print
function so we might get a better idea.
al
 
A

al edlund

you might want to look at the recent "visio vba newbie"
post for how to handle prompts. I'd probably be more
interested in why it wants to do a 'save', and which
program is giving you the message. within your excel vba
code can you save a portion of the spreadsheet as pdf
without getting the prompt?
al
 
A

Al Edlund

the first question would be "who is giving you the prompt for save as since you just want to print?".
Since you're driving this with excel, can you dump the spreadsheet to pdf and reduce
the level of complexity by at least one product?
 
S

Shakil Mian

Hi Al,

I have managed to solve the problem of removing the message box.

The solution was to use;

Application.ActivePrinter = "Acrobat Distiller on Ne01:"

not

vsoApp.ActivePrinter = "Acrobat Distiller" (within excel).

Note that i have also added - "... on Ne01:".

The is when some more fun stuff starts as I have removed the "save as"
dialog box but still can't change the default printer to "Acrobat
Distiller on Ne01:". You maybe asking, "how did I come across full
printer name", all i did was;

msgbox application.activeprinter

Thanks for your help,

Shakil Mian
 

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