M
melon
I have a RTF string strTest set to the following:
{\rtf1\ansi\ansicpg1252\deff0\deftab360{\fonttbl{\f0\fswiss Arial;}
{\f1\fswiss\fcharset0 Arial;}}
{\*\generator Riched20 5.50.99.2050;}\viewkind4\uc1\pard
\f0\fs20\lang1033\par
\par
\f1 TEST\f0\par
}
I am trying to copy it using the following
Dim MyData As DataObject
Set MyData = New DataObject
MsgBox strTest ' make sure I am copying the correct
thing
MyData.SetText strTest , -16639 ' VBCFRTF doesn't
work
MyData.PutInClipboard
However, nothing is put into the clipboard, when I try to run
objWord.ActiveDOcument.Bookmarks("Body").Range.Paste
I will get a Command Fail error.
{\rtf1\ansi\ansicpg1252\deff0\deftab360{\fonttbl{\f0\fswiss Arial;}
{\f1\fswiss\fcharset0 Arial;}}
{\*\generator Riched20 5.50.99.2050;}\viewkind4\uc1\pard
\f0\fs20\lang1033\par
\par
\f1 TEST\f0\par
}
I am trying to copy it using the following
Dim MyData As DataObject
Set MyData = New DataObject
MsgBox strTest ' make sure I am copying the correct
thing
MyData.SetText strTest , -16639 ' VBCFRTF doesn't
work
MyData.PutInClipboard
However, nothing is put into the clipboard, when I try to run
objWord.ActiveDOcument.Bookmarks("Body").Range.Paste
I will get a Command Fail error.