Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to open Microsoft.Office.OneNote and load a specific file to it using a vb.net windows forms application. How would I go about it?
Posted

1 solution

You would need to check its command line options.
Like to open a file with notepad it would be.
Process.Start("Notepad.exe", "C:\Users\Joe\Documents\Test.txt")


Edit:
found the switches.
http://office.microsoft.com/en-us/onenote-help/command-line-switches-in-microsoft-office-onenote-2007-HA010177833.aspx[^]
 
Share this answer
 
v2
Comments
maestro1955 26-Aug-14 9:06am    
Thank you so much for your prompt response. I actually found that using the Web Browser object in vb.net will do the trick since I do not need to edit the document, but just view it.

Thanks again,
Cheers
ledtech3 26-Aug-14 18:52pm    
ok so you are viewing the document in web browser control instead of opening it in one note, Is that correct ?
maestro1955 27-Aug-14 8:20am    
Yes, I used the Browser Control to view the Onenote content inside of my VB.NET project. It is much faster and does not require launching the onenote application. Since I only wanted to view the xml pages without saving them or editing them, it worked perfectly!
Thanks,
Cheers
ledtech3 27-Aug-14 19:06pm    
Great glad you have it going.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900