Configuración impresión Publisher
Publicado por Maria BJ (2 intervenciones) el 26/11/2009 09:40:27
Buenas, cuando abro un documento Publisher y voy a Archivo->Configuración impresión->Tamaño, me gustaría cambiar el valor de este campo por código. El objeto printer (del Publisher) tiene una propiedad que es PageSize pero es de solo lectura y no me permite modificar el valor. Como podeis ver en el código, si se puede modificar el tamaño del documento pero yo necesito el de la configuración de impresión del mismo.
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)
.........
¿Alguien me podría ayudar? Saludos y gracias
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)
.........
¿Alguien me podría ayudar? Saludos y gracias
Valora esta pregunta


0