FileName Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesCore. dll
- Also in
TXTextControl.asTextControl. ASP. SDK TXTextControl.dll
Description
Gets the file's name. It can include a relative or absolute path.
Syntax
public string FileName { get; }Public ReadOnly Property FileName As StringExamples
The following example configures a PDF attachment before embedding it in a WordprocessingML document by using EmbeddedFile.FileName.
EmbeddedFile embeddedFile = new("terms.pdf", @"Attachments\terms.pdf", "application/pdf");
Console.WriteLine($"File Name: {embeddedFile.FileName}");
Console.WriteLine("Embedded File is ready for use.");
SaveSettings saveSettings = new() { EmbeddedFiles = new[] { embeddedFile } };
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings);Dim embeddedFile As New EmbeddedFile("terms.pdf", "Attachments\terms.pdf", "application/pdf")
Console.WriteLine($"File Name: {embeddedFile.FileName}")
Console.WriteLine("Embedded File is ready for use.")
Dim saveSettings As New SaveSettings() With { .EmbeddedFiles = New EmbeddedFile() { embeddedFile } }
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings)Limitations
Read only.