DocumentBuilder insertHtml h1 tag

Hi,


I’m using aspose word version 14.10.0.0 and it seems to have a problem when I try to insert h1 tag inside a document my document.

Here is my code

var document = new Document(“c:\temp\email.docx”);
var values = new Dictionary<string, string> {
{“test”, “hoho” }
};
DocumentBuilder builder = new DocumentBuilder(document);
builder.InsertHtml(“

test

”);

document.MailMerge.Execute(values.Keys.ToArray(), values.Values.ToArray());

You’ll find attached the “template”. Here is the exception I get when it executes the mailmerge.execute line:


[FormatException: Input string was not in a correct format.]
System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) +14345541
System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +305
.(Object , Object , Object , ​ ) +239
.( ) +142
.VisitRun(Run ) +19
Aspose.Words.Run.Accept(DocumentVisitor visitor) +24
Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor) +84
Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor) +85
Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor) +84
Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor) +85
Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor) +84
Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor) +85
Aspose.Words.CompositeNode.AcceptChildren(DocumentVisitor visitor) +84
Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor) +85
.(DocumentBase , ) +73
.(DocumentBase ) +99
.VisitDocumentEnd(Document ) +9
Aspose.Words.CompositeNode.AcceptCore(DocumentVisitor visitor) +113
.( ) +597
.(Document , ) +192
Aspose.Words.Document.(Boolean ) +88
.( , ) +101
. ( ) +240
Hi Cedric,

Thanks for your inquiry.

While using the latest version of Aspose.Words i.e. 14.10.0, I managed to reproduce this issue on my side. I have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-11025. Your request has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-11025) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.