Class OneNoteApplication
- Namespace
- Odotocodot.OneNote.Linq
- Assembly
- Odotocodot.OneNote.Linq.dll
A static wrapper class around the Microsoft.Office.Interop.OneNote.Application class, allowing for lazy acquirement and release of a OneNote COM object. In addition to exposing the OneNote's API
public static class OneNoteApplication
- Inheritance
-
OneNoteApplication
- Inherited Members
Remarks
A OneNote COM object is required to access any of the OneNote API.
Fields
- InvalidNotebookChars
An array containing the characters that are not allowed in a notebook name.
These are: \ / * ? " | < > : % # .
- InvalidSectionChars
An array containing the characters that are not allowed in a section name.
These are: \ / * ? " | < > : % # &
- InvalidSectionGroupChars
An array containing the characters that are not allowed in a section group name.
These are: \ / * ? " | < > : % # &
- RelativePathSeparator
The directory separator used in RelativePath.
Properties
- HasComObject
Indicates whether the class has a usable COM Object instance.
Methods
- CreateNotebook(string, bool)
Creates a notebook with a title equal to
name
located in the default notebook location.
- CreatePage(OneNoteSection, string, bool)
Creates a page with a title equal to
name
located in the specifiedsection
.
- CreateQuickNote(bool)
Creates a quick note page located currently set quick notes location.
- CreateSection(OneNoteNotebook, string, bool)
Creates a section with a title equal to
name
located in the specifiedparent
notebook.
- CreateSection(OneNoteSectionGroup, string, bool)
Creates a section with a title equal to
name
located in the specifiedparent
section group.
- CreateSectionGroup(OneNoteNotebook, string, bool)
Creates a section group with a title equal to
name
located in the specifiedparent
notebook.
- CreateSectionGroup(OneNoteSectionGroup, string, bool)
Creates a section group with a title equal to
name
located in the specifiedparent
section group.
- FindPages(string)
Get a flattened collection of pages that match the
search
parameter.
- FindPages(string, IOneNoteItem)
Get a flattened collection of pages that match the Within the specifiedsearch
parameter.scope
.
- GetBackUpLocation()
Retrieves the path on disk to the back up folder location.
- GetDefaultNotebookLocation()
Retrieves the path on disk to the default notebook folder location, this is where new notebooks are created and saved to.
- GetNotebooks()
Get all notebooks down to all children.
- GetPageContent(OneNotePage)
Gets the content of the specified
page
.
- GetUnfiledNotesSection()
Retrieves the folder path on disk to the unfiled notes section, this is also where quick notes are created and saved to.
- InitComObject()
Forcible initialises the static class by acquiring a OneNote COM object. Does nothing if a COM object is already accessible.
- IsNotebookNameValid(string)
Returns a value that indicates whether the supplied
name
is a valid for a notebook.
- IsSectionGroupNameValid(string)
Returns a value that indicates whether the supplied
name
is a valid for a section group.
- IsSectionNameValid(string)
Returns a value that indicates whether the supplied
name
is a valid for a section.
- OpenInOneNote(IOneNoteItem)
Opens the
item
in OneNote (creates a new OneNote window if one is not currently open).
- ReleaseComObject()
Releases the OneNote COM object freeing memory.
- SyncItem(IOneNoteItem)
Forces OneNote to sync the
item
.