ExportFileName 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 or sets the file name of an image used, if a Text Control document is saved. An empty string indicates that no export filename has currently be specified for the image. In this case either the original or a constructed filename is used. A filename is constructed in the following form: <document_filename>_<number>.<extension>
Syntax
public string ExportFileName { get; set; }Public Property ExportFileName As StringExamples
The following example inserts and configures a named, accessible company logo by using Image.ExportFileName.
TXTextControl.Image image = new() { FileName = @"Images\company-logo.png", Name = "CompanyLogo" };
textControl.Images.Add(image, -1);
image.ExportFileName = @"Exports\company-logo.png";
if (!string.IsNullOrWhiteSpace(image.ExportFileName))
{
Console.WriteLine($"Export File Name: {image.ExportFileName}");
}
textControl.Save("report-with-logo.docx", StreamType.WordprocessingML);Dim image As New TXTextControl.Image() With { .FileName = "Images\company-logo.png", .Name = "CompanyLogo" }
textControl.Images.Add(image, -1)
image.ExportFileName = "Exports\company-logo.png"
If Not String.IsNullOrWhiteSpace(image.ExportFileName) Then
Console.WriteLine($"Export File Name: {image.ExportFileName}")
End If
textControl.Save("report-with-logo.docx", StreamType.WordprocessingML)