Cannot print a doc to a required printer

D

DPM

Hi,

Problem is as follows,
MS Word documents are printed to the Windows default printer using
ShellExecute() from VB.
This works fine if there are no existing MS Word sessions opened.(MS Outlook
also opens a MS Word session)
If there is a MS Word sesson already opened it does not print to the Widows
deafult printer always.

Following is how the problem can be simulated without programming,
=> Default printer set in Windows is A
=> MS Word document B is opened, from Windows explorer
=> Another MS document C, is opened from Windows explorer
=> From MS Word C is printed to printer D from File menu, Print option,
although the Windows default printer is A
=> Document C is closed.
=> Now document E is opened from Windows explorer
=> When E is printed at this time from File, Print option the printer
selected is D, not A

Therefore how could document E be printed to printer A from VB?
Is there any parameters which could be passed into ShellExecute which will
always use a specified printer or the Windows default printer?

Please could someone advice.
 

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