Cannot open publisher document using Application.Open

D

Dorell

Hi All,

I'm receiving error message "Publisher has detected a problem in the file
you are trying to open. To protect your computer, Publisher will not open the
file." when attempting to open a publisher document. Here is what the code
looks like...

Application publisherApplication = null;
Document document = null;
Try
{
publisherApplication = new Application();
document = publisherApplication.Open(this.File.FullName, true, false,
PbSaveOptions.pbDoNotSaveChanges);
}
Finally
{
// Release COM objects
}

The message is appearing when I call Open. Sometimes it manages to open the
document and I can always open the document in publisher, although there was
one occasion when I received the message when opening another document in
publisher. This issue occurs on different documents so cannot be down to the
document being corrupt. I have Office 2007 SP2 running on Windows 7 (RC) and
I'm using the Microsoft.Office.Interop.Publisher (v 12) assembly. I have
searched the knowledge base and tried adding the PromptForBadFiles sub key
with a hex value of 1 under
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Publisher. I then received a
different error (Exception from HRESULT: 0x80FF000D). I have also tried the
hot fix located at http://support.microsoft.com/default.aspx/kb/976177/en-us
and still cannot open the document.

Has anyone encountered this issue before and found a solution or workaround?

Regards,
Jason
 

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