Free Support Forum - aspose.com

Merge Field Fonts

I am using a DocumentBuilder to change a font to Wingdings. Unforunately, it adds a lot of time doing a database lookup to determine if this is necessary. I do thousands of the lookups. So the Aspose code is fast, just no the data access. I am doing something like this:

Dim docBuilder As DocumentBuilder = New DocumentBuilder(e.Document)

docBuilder.MoveToMergeField(e.FieldName)

docBuilder.Font.Name = "Wingdings"

docBuilder.Write(e.FieldValue)

I do know ahead of time when I put a merge field into a document that it will be a wingdings font, but if I make the field wingdings, the template looks pretty stupid because the whole field is in wingdings. Is there some kind of switch I can put on a merge field, or some way to designate that it should be the wingdings font without having to highlight the WHOLE field and make it wingdings?

Derek

Hi

Thanks for your request. I think that you can use \*Charformat switch. See the following link.
http://www.eggheadcafe.com/software/aspnet/30941293/mail-merge-field--font-s.aspx

Also see the following link

http://homepage.hispeed.ch/cindymeister/mergfaq.htm

Best regards.