Here’s still more functionality packed into the OneNoteImporter assembly:
You can also modify how OneNote starts by using the following methods of the Application object. These methods ‘wrap’ command line switches that customize how the OneNote application starts.
The table below lists the Application object methods, and the command line switch each invokes. If a method is overloaded, the number of overloads is noted next to the method name. In most cases, the method is overloaded to account for the fact that the command line switch takes a series of optional string arguments.
All the method parameters take strings, except the openReadonly parameter of the Open method, which takes a Boolean value.
Command line switch
(sessionAddress, password, sectionPath)
(videoDevice, audioDevice, recordingProfilepath)
Be aware that these Application methods have been implemented as asynchronous command line calls. Because of this, your code continues to run after it calls Application method is called, independent of whether or not the OneNote application has yet launched.
In addition, you can use the Activate method to bring the OneNote application to the foreground.
For more information on the command line switches, see Customizing OneNote 2003 SP 1 Using New Command Line Switches.
Is there anything these guys didn’t think of?