Since upgrading to version 3 we have had our macro re-written for opening a document in MS Word. Unfortunately we each use this macro 100 + times a day and it opens Word each time rather than just opening a Word document. Our technical person has tried & tried but without joy. Can anyone advise ?
' The following 2 lines are commented out as they create new instances of the word application
' The following 4 lines open the CV file using an existing copy of Word
' On Error Resume Next
' set word=getobject(,"Word.Document")
' If IsObject(Word) = False Then Set Word = CreateObject("word.application")
Why don't you make the field clickable? From your macro I gather that all CV's are in H:\documents\cv\. Just give the field the caption "file://H:\documents\cv\".
You would have to add the ".doc" suffx to your filenames though, but batch edit would solve that in just a few seconds.
After you've done this, the filename becomes clickable and the document will open always in the same instance of Word. No macro needed.
Charles, tried your method which was also recommended by someone else. Looks like a perfect solution for us to open associated WORD documents that have their address completely specified within our cardbox record.
However, after adding the caption FILE://, clicking on the field seems to do nothing other than highlight it!
Have I missed something here?
(We are using CB3 recently purchased)
Martin, make sure that the database is opened in the "completely trusted" mode. Below the list of filenames that appears when you select File, Open is a box that specifies the safety level. Any level lower than completely trusted does not allow the opening of external files from a record.
You can set the default safety level for your server using the "Server safety" button on the same screen.