API Onenote 2007 - publish

A

Axel Rassart

After a lot of readings, and googling (2 days) , i still was not able to have
the method publish of onenote 2007 working.

By any chance, is anybody can send me a sample or a link of the use of this
method.

Sorry for my english syntax, I usually write in french.

TY
 
I

Ilya Koulchin

Axel said:
After a lot of readings, and googling (2 days) , i still was not able to have
the method publish of onenote 2007 working.

How're you calling the code, and what error are you getting back?

Ilya
 
A

Axel Rassart

VBNET:

onApp.Publish("{98087255-B711-4BDC-9C53-F070E038D443}{1}{B0}",
"TEST998.pdf", PublishFormat.pfPDF)

I copy then ID from omspy, the onApp object is ok (i build a page).

The error message is: Chaîne de classe incorrecte (Exception de HRESULT :
0x800401F3 (CO_E_CLASSSTRING))

Thank You
 
I

Ilya Koulchin

Axel said:
VBNET:

onApp.Publish("{98087255-B711-4BDC-9C53-F070E038D443}{1}{B0}",
"TEST998.pdf", PublishFormat.pfPDF)

I copy then ID from omspy, the onApp object is ok (i build a page).

The error message is: Chaîne de classe incorrecte (Exception de HRESULT :
0x800401F3 (CO_E_CLASSSTRING))

Try explicitly passing null or the empty string as the fourth arument to
publish. Does that work?

Ilya
 
A

Axel Rassart

This correct an error (the one for the parameter, before i was trying "0" as
the api documentation suggest),

After i got a second error, file not found error (code 2006), i had to
specify the path for the output file (pdf) to correct the second one.

Thank you very much Ilya.

AR
 
I

Ilya Koulchin

Could you give me a link to the documentation that you were referring to?

Ilya
 
D

dyowee

Good day
I tried the same approach but I'm still getting an error (file no
found). =

string tempPath = Path.Combine(Path.GetTempFolderName(), "test.pdf")
OnApp.Publish(_pageId, tempPath, PublishFormat.pfPDF, "")

This fails, even if I use null for the last parameter
 

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