Hi,
I have created document with hyperlink with mergefield:
image.png (34.4 KB)
When opened in Aspose and saved as docs this is how it looks:
image.png (33.1 KB)
This is the example file:
file.docx (15.9 KB)
Code used:
var saveOptions = new OoxmlSaveOptions
{
SaveFormat = SaveFormat.Docx
};
var loadOptions = new LoadOptions(LoadFormat.Docx, "", "");
var document = new Document("file.docx", loadOptions);
document.JoinRunsWithSameFormatting();
Console.WriteLine(document.Compliance.ToString());
Console.WriteLine(document.OriginalLoadFormat.ToString());
document.Save("out.docx", saveOptions);
When merge field is merged in first document it works correctly:
image.png (85.0 KB)
document.MailMerge.MergeWholeDocument = true;
document.MailMerge.TrimWhitespaces = false;
document.MailMerge.Execute(new string[] { "website" }, new object[] { "https://forum.aspose.com/" });
document.Save("out.pdf", SaveFormat.Pdf);
Is there some setting I am missing?
If the hyperlink with mergefield is the fist thing in document it works correctly.
Thanks