CustomDocumentProperties
PlainTextDocument.CustomDocumentProperties property
ObtientCustomDocumentProperties
du document.
public CustomDocumentProperties CustomDocumentProperties { get; }
Exemples
Montre comment charger le contenu d’un document Microsoft Word en texte brut, puis accéder aux propriétés personnalisées du document d’origine.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.Writeln("Hello world!");
doc.CustomDocumentProperties.Add("Location of writing", "123 Main St, London, UK");
doc.Save(ArtifactsDir + "PlainTextDocument.CustomDocumentProperties.docx");
PlainTextDocument plaintext = new PlainTextDocument(ArtifactsDir + "PlainTextDocument.CustomDocumentProperties.docx");
Assert.AreEqual("Hello world!", plaintext.Text.Trim());
Assert.AreEqual("123 Main St, London, UK", plaintext.CustomDocumentProperties["Location of writing"].Value);
Voir également
- class CustomDocumentProperties
- class PlainTextDocument
- espace de noms Aspose.Words
- Assemblée Aspose.Words