Hi
I need to have some text in the format:
Email:
[email protected]Email -> simple text
[email protected] -> a hyper ink, clicking on the same would open a new mail message.
I am using the following piece of code.
IWParagraph para = footerTbl[0, 0].AddParagraph();
para.AppendText("Email: " + emailAddr).CharacterFormat.FontSize = 7;
IWField email = para.AppendField(emailAddr, FieldType.FieldHyperlink);
email.CharacterFormat.FontSize = 7;
Hyperlink emailLink = new Hyperlink(email as WField);
emailLink.Type = HyperlinkType.EMailLink;
emailLink.Uri = "mailto:" + emailAddr;
When i open the document, it throws an error when for styles, but clickeing on recover doc does have the required email in the document.
Another thing is - the same code creates a doc without any errors in a Windows App but not when it's a class library.
Can you please help.
Thanks
-Namita