Quantcast
Channel: General Office Development forum
Viewing all articles
Browse latest Browse all 2257

Microsoft.Office.Interop.Publisher usage - How to set printer to other than default printer ?

$
0
0

Hi All,

I've created an application in vb.net that opens a MS Publisher template from disk and updates its textbox objects.

As a final step I wish to redirect the printing to a selectable printer installed on a users PC.  I can't see anywhere within the semi-documented Publisher Object model where to override a printer programmatically.  What works in other Office Object models doesn't seem to work in Publisher.

 

'Open application

DimobjPublisherAsNewPublisher.Application()

'Open document on disk in Read-only mode

DimobjPubDocAsPublisher.Document

objPubDoc = objPublisher.Open(

"J:\ApprovalDrawingTemplate.pub",True,False, Publisher.PbSaveOptions.pbDoNotSaveChanges)

...

'Print Active document to default printer

objPubDoc.PrintOutEx()

This all works fine printing an updated template (without saving it) to a users default printer.

How do I send the printing to a users different available printer ?

Thank you for any advice,

Dave


Viewing all articles
Browse latest Browse all 2257

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>