Publisher Configuration Printer

M

Maria

Hello, when I open a Publisher document, I can go to File-> Printer
Configuration and change the Size (A4, A3, etc). I would like to change the
value of this field by code. The printer object (of Publisher) has a property
which is PageSize but it is only of reading and It doesn't allow me to change
the value. As you can see in the code, It's possible to change the document
size but I need to change the printer configuration size.

Imports Microsoft.Office.Interop.Publisher
.......
Dim pbPrinter, pbMyPrinter As Printer
Dim appDoc As New Microsoft.Office.Interop.Publisher.Document
Dim appPub As Microsoft.Office.Interop.Publisher.Application = New
Microsoft.Office.Interop.Publisher.Application
appDoc = appPub.Open(My.Application.Info.DirectoryPath & "\Publi.pub",
False, False, PbSaveOptions.pbDoNotSaveChanges)

appPub.ActiveWindow.Visible = True
appPub.ActiveDocument.PageSetup.PageHeight = appPub.MillimetersToPoints(55.7)
appPub.ActiveDocument.PageSetup.PageWidth = appPub.MillimetersToPoints(39.4)
......

¿Could somebody help me,please?
Regards and thanks
 

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