content control vsto font getting changed

Topics: Developer Forum, Project Management Forum, User Forum
Jan 13, 2012 at 3:26 AM

Hi All,

I have few content controls that I am populating with data. But in one content control, the font sometimes getting changed from whatever expected. It is happening in rare scenarios.

Is there any soluion for the same.

Is there any problem with the content control ? Below is the code we are trying to paste in the content control:-

contentControlData = "<table align= "left" style="WIDTH: 95%; FONT-FAMILY: Times New Roman; FONT-SIZE: 16px;vertical-align:text-top;" border=0 cellSpacing=0 cellPadding=0 > <tbody> <tr align="left" style="width: 60px"> <td style="width: 15%">&nbsp;&nbsp;</td> <td style="width: 21%" align='center'><b>FY 2012</b></td> <td></td> </tr> <tr align="left" style="width: 60px"> <td style="width:15%">&nbsp;</td> <td style="border-top-style: solid;border-top-width:1px;border-top-color: #000000; border-top:1px;border-left:0px;border-right:0px;border-bottom:0px;width:21%;"><B>Request No.:</B>&nbsp;117326</td> <td>&nbsp;</td> </tr> </tbody> </table> '

HtmlFragment.CopyToClipboard(ReplaceSpecialCharacters.ReplacingSpecialCharacters(contentControlData).Replace("<center>", "").Replace("</center>", ""));

contentControls.get_Item(ref i).Range.Select();

Globals.ThisAddIn.Application.ActiveDocument.Application.Selection.PasteSpecial(ref missingVal, ref missingVal,ref missingVal, ref missingVal, ref typeHtml, ref missingVal, refmissingVal);  

Inspite of giving FONT-SIZE : 16px, it is taking 6 px ..

Reply is appreciated.

Thanks,

DS