Error 4605 Word Selection.Paste

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
 
W

Word Heretic

G'day (e-mail address removed) (Syd),

Please dont double-pos - if abs necc then reply to your original post
so we have but one thread to deal with.

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


Syd reckoned:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top