PDA

View Full Version : Hyperlink issue



mdmackillop
10-09-2004, 03:21 PM
If I use a shell command to open a mailmerge document, things are OK.
Call Shell("c:\program files\microsoft office\office\winword.exe C:\Database\val\Letter2.doc", 1)

If I use a hyperlink to the same document,
Application.FollowHyperlink "C:\Database\val\Letter2.doc"

the following message appears when I return to Access (the mailmerge etc. all function properly). Any ideas?
MD


Run-time Error 261
An unexpected error has occurred.

spaz9876
06-29-2005, 09:38 AM
Is this a button on a switchboard? If so, you can do something like this in your switchboard:
Case 1
Dim oApp2 As Object
Set oApp2 = CreateObject("Word.Application")
oApp2.Documents.Open "C:\Database\val\Letter2.doc"
oApp2.Visible = True