In MicroStation XM, the following code would allow a paste function to the Word Processor, "SendKeys "^(V)", True"
In V8i, this does not work. Below is the code as we are using it but when the above mentioned keyin is called, all that's put in the dialog box is the letter "V" Any reason why this would stop working? Thanks
Dim TheTextRange As Range Set TheTextRange = WordtabAP.ActiveDocument.Range '(BookStart, BookEnd) TheTextRange.Select TheTextRange.Copy Dim TheDocumentText As String TheDocumentText = TheTextRange TheTextRange.Copy ' Copy the Document
CadInputQueue.SendKeyin "Place DIALOGTEXT ICON" SetCExpressionValue "gWordProcResourceData.method", 0, "WORDPROC" AppActivate "Text Editor - Word Processor" DoEvents SendKeys "^(V)", True 'paste copied document into microstation word processor DoEvents WordtabAP.Quit ' Close the Word Document
Hi,
I use this routine to paste unformatted test into the word processor...
Sub PasteTextWithoutFormat() Dim ClipBd As New DataObject Dim Text As String ClipBd.GetFromClipboard Text = ClipBd.GetText Set ClipBd = New DataObject ClipBd.SetText Text ClipBd.PutInClipboard On Error Resume Next CadInputQueue.SendMessageToApplication "WORDPROC", "1 PasteTextInEditor " & Len(Text) & " " & Text On Error GoTo 0 End Sub
Perhaps you can use the same command...
--Robert