C
Christoph Hilmes
Hi NG,
i have an application using vb and word. I control word from within my
vb-application using vba. At one point i extract the text of a document in
rtf format (with all the rtf-commands) and put it into a string-variable.
Then i replace parts of the text using a string-search-and-replace-
algorithm. Afterwards i paste the text back into the word-document so that
the formatting is not lost. To achieve that i use the windows-clipboard.
To get the text out of the document:
Select_Text pos_beginn, pos_end
Clipboard.Clear
wordobj.Selection.Cut
text = Clipboard.GetText(vbCFRTF)
To paste it back into the document
Clipboard.Clear
Clipboard.SetText "{" & text_ein & "}", vbCFRTF
Select_Text pos_beginn, pos_end
wordobj.Selection.Range.Paste
That works pretty well on most systems. But with certain configurations
(most of all terminal-server-emulations) i got problems using the
clipboard. Therefore i search for another solution for my problem without
using the clipboard.
Can anybody help me here?
Thanks in advance.
Christoph
VB 6
Word 2000
i have an application using vb and word. I control word from within my
vb-application using vba. At one point i extract the text of a document in
rtf format (with all the rtf-commands) and put it into a string-variable.
Then i replace parts of the text using a string-search-and-replace-
algorithm. Afterwards i paste the text back into the word-document so that
the formatting is not lost. To achieve that i use the windows-clipboard.
To get the text out of the document:
Select_Text pos_beginn, pos_end
Clipboard.Clear
wordobj.Selection.Cut
text = Clipboard.GetText(vbCFRTF)
To paste it back into the document
Clipboard.Clear
Clipboard.SetText "{" & text_ein & "}", vbCFRTF
Select_Text pos_beginn, pos_end
wordobj.Selection.Range.Paste
That works pretty well on most systems. But with certain configurations
(most of all terminal-server-emulations) i got problems using the
clipboard. Therefore i search for another solution for my problem without
using the clipboard.
Can anybody help me here?
Thanks in advance.
Christoph
VB 6
Word 2000