Enum FileFormat

Enum FileFormat

Namespace: Aspose.Note
Assembly: Aspose.Note.dll (25.6.0)

Represents OneNote file format.

public enum FileFormat
{
    Pdf,
    WordDocument,
    ExcelWorkbook,
    Rtf,
    Html,
    FlatOpcXml,
    OpenXmlText,
    Dotm,
    Dotx,
    Odt,
    Potm,
    Potx,
    Ppsm,
    Ppsx,
    Pptm,
    Pptx,
    Xps,
    Tiff,
    Svg,
    Image,
    Barcode,
    Emf,
    Wmf,
    OcrResult,
    Odp,
    OneNote,
    Dna,
    Swf,
    FixedLayout,
    FlatOpcXmlText,
    Text,
    Template,
    Field,
    CustomXml,
    DocumentProperty,
    ApplicationProperty,
    InlineShape,
    Comments,
    Revision,
    Redaction,
    Watermark,
    Footer,
    Header,
    TableOfContents,
    HyperlinkBase,
    MailMergeField,
    SmartTag,
    ContentControl,
    CrossReference,
    BookmarkStart,
    BookmarkEnd,
    DocumentPropertyStart,
    DocumentPropertyEnd,
    ApplicationPropertyStart,
    ApplicationPropertyEnd
}

Fields

OneNote2007 = 1

OneNote 2010.

OneNote2010 = 2

OneNote 2010.

OneNoteOnline = 3

OneNote Online.

Unknown = 0

Unknown file format.

Examples

Shows how to check if a document load is failed because OneNote 2007 format is not supported.

string dataDir = RunExamples.GetDataDir_LoadingAndSaving();
   string fileName = Path.Combine(dataDir, "OneNote2007.one");
   try
   {
      new Document(fileName);
   }
   catch (UnsupportedFileFormatException e)
   {
      if (e.FileFormat == FileFormat.OneNote2007)
      {
         Console.WriteLine("It looks like the provided file is in OneNote 2007 format that is not supported.");
      }
      else
      {
         throw;
      }
   }
 English