Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Fields.UpdateDocFields.Run C# (CSharp) Méthode

Run() public static méthode

public static Run ( ) : void
Résultat void
        public static void Run()
        {
            // ExStart:UpdateDocFields
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_WorkingWithFields();

            Document doc = new Document(dataDir + "Rendering.doc");

            // This updates all fields in the document.
            doc.UpdateFields();
            dataDir = dataDir + "Rendering.UpdateFields_out.pdf";
            doc.Save(dataDir);
            // ExEnd:UpdateDocFields
            Console.WriteLine("\nDocument fields updated successfully.\nFile saved at " + dataDir);
        }
    }
UpdateDocFields