Enum FileFormat

Enum FileFormat

Navne til: Aspose.Note Sammensætning: Aspose.Note.dll (25.4.0)

Det er OneNote filformatet.

public enum FileFormat

Fields

OneNote2007 = 1

Det er OneNote 2010.

OneNote2010 = 2

Det er OneNote 2010.

OneNoteOnline = 3

OneNote på nettet.

Unknown = 0

Det ukendte filformat.

Examples

Det viser, hvordan man kontrollerer, om en dokumentladning er mislykkede, fordi OneNote 2007-formatet ikke er understøttet.

// The path to the documents directory.
                                                                                                        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;
                                                                                                        }
 Dansk