Allignment in word RRS feed

  • Question

  • Hi all,

    I used the following code to export data from InfoPath template to word docment. The generated .mht file is having correct alignment. The table contains a row with Expression or Textbox and text having the right alignment. But after copied to word document the alignment in textbox set to left.

    Could you please help me in to set the alignment correctly?


    <td style="border-bottom:#517dbf 1pt solid;border-vertical-align:top;border-border-right:#517dbf 1pt solid" width=80>
    <div align=center><font size=1><span style="text-align:right;padding-bottom:1px;overflow-x:visible;margin:1px;padding-width:72px;text-padding-right:1px;word-wrap:break-word;white-space:normal;font-size:xx-small;padding-mso-element:ip-textbox" id=L099E0D806D758192 title="">3.12585</span></font></div></td>

    this.formControl1.XmlForm.CurrentView.Export(exportPathFileName + ".mht", ExportFormat.Mht);

     File.Copy(exportPathFileName + ".mht", exportPathFileName + ".doc", true);

    Tuesday, April 17, 2012 5:20 AM

All replies

  • Hi Brahma A,

    Welcome to MSDN Forum.

    The Markup Language of Word is different from the Markup Language of mht. So Word cannot resolve the Markup Language correctly. As far as I know, there is no efficient workaround for this temporarily.

    Hope this can explain the scenario.

    Best Regards,

    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    Friday, April 20, 2012 8:50 AM