General information
Category:
COM/DCOM and OLE Automation
Title:
Paste RTF into Word from a field
I have RTF text (like: {\rtf1\ansi\ansicpg1252\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}...) in a field. I am trying to write automation code to paste that text into Word as formatted text.
I can get the text, unformatted, to paste and I can get the RTF code itself (like above) to paste, but not the formatted text that the code represents. If I try using the clipboard, it seems like the clipboard does not recognize that the text is RTF code - so I do not get the Paste Special option for "Formatted Text (RTF)" in Word as I would if I just did Ctrl-C in the RTF ActiveX control. Using .TextRange.PasteSpecial(,,,,wdPasteRTF) returns an error.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only