S
Syd
Hi there,
I'm using MS Mappoint to create route and then use its function to
copy the calculated route to the clipboard.
Then I'd like to paste it in my word document. Then the error 4605
occurs.
Here is my code:
Dim thisWordApp As Object
Dim strTempPath As String
Dim strFilePathName As String
If objMap.ActiveRoute.IsCalculated Then
Clipboard.Clear
Set thisWordApp = WordApp
If thisWordApp Is Nothing Then
Exit Sub
End If
If m_TempDoc Is Nothing Then
thisWordApp.Documents.Add
Set m_TempDoc = thisWordApp.activedocument
End If
strFilePathName = strSomePath & "Route.doc"
objMap.CopyDirections
DoEvents
thisWordApp.Selection.Paste
---> here I get the error 4605 clipboard empty or not valid
I have small tool that shows me that the Clipboard is not empty.
My questions are:
Why is the Clipboard not valid? Where can I fix it? some preferences
in Word? Or
should I clear the word.clipboard first? If so, why is my source code
working on every other pc except the one of my colleague?
I read some MS articles but for me it seems that there are a lot of
different reasons for this error.
Please help!
Thanks in advance,
Syd
I'm using MS Mappoint to create route and then use its function to
copy the calculated route to the clipboard.
Then I'd like to paste it in my word document. Then the error 4605
occurs.
Here is my code:
Dim thisWordApp As Object
Dim strTempPath As String
Dim strFilePathName As String
If objMap.ActiveRoute.IsCalculated Then
Clipboard.Clear
Set thisWordApp = WordApp
If thisWordApp Is Nothing Then
Exit Sub
End If
If m_TempDoc Is Nothing Then
thisWordApp.Documents.Add
Set m_TempDoc = thisWordApp.activedocument
End If
strFilePathName = strSomePath & "Route.doc"
objMap.CopyDirections
DoEvents
thisWordApp.Selection.Paste
---> here I get the error 4605 clipboard empty or not valid
I have small tool that shows me that the Clipboard is not empty.
My questions are:
Why is the Clipboard not valid? Where can I fix it? some preferences
in Word? Or
should I clear the word.clipboard first? If so, why is my source code
working on every other pc except the one of my colleague?
I read some MS articles but for me it seems that there are a lot of
different reasons for this error.
Please help!
Thanks in advance,
Syd