WDFormatOriginalFormatting does not retain formatting when content pasted from RTF
I am trying to copy the content from RTF (includes Text and Tables) to Word 2010 document programatically and i find the format is getting lost after pasting to word 2010.
Option1 :
pWrdDoc.Sections.Last.Range.PasteAndFormat.Word.Wd RecoveryType.
WdFormatOriginalFormatting)
Doesn't work.
Option 2:
pWrdDoc.Sections.Last.Range.PasteSpecial(, , , , WdPasteDataType.wdPasteRTF, )
Doesn't work.
Can anyone help me out how to resolve this issue programatically.
|