pub2007 - modify PageSetup.MultiplePagesPerSheet programmatically

B

bcarsto

During the corse of automating publisher2007 in vs2008 with C#, I need to
modify the PageSetup properties, particularly MultiplePagesPerSheet . I use
the following code to do this
// create application
Microsoft.Office.Interop.Publisher.Application a = new
Microsoft.Office.Interop.Publisher.Application();

// open document
Microsoft.Office.Interop.Publisher.Document d =
a.Open(@"C:\projects\future\publisher2007\publisher2007\3x5_example.pub",
false, false, PbSaveOptions.pbDoNotSaveChanges);

// read then modify property
bool m = d.PageSetup.MultiplePagesPerSheet;
d.PageSetup.MultiplePagesPerSheet = m;

This last like causes an exception {"Exception from HRESULT: 0x8004005A"}
with publisher 2007 and works fine with publisher 2003

I can provide sample PB file and c# project.thanks

bob
 

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