hmachan
09-04-2007, 05:14 PM
Please share code for this:
The hyperlink to a word.doc file is embedded as field of record in a table.
I would like to be able to call up or activate that hypelink from a form with the end of opening the word.doc file.
thanks in advance...
llkhoutx
09-05-2007, 06:03 AM
Use Access "Word Automation" it's widely documented.
hmachan
09-05-2007, 07:13 AM
thanks for the reply llkhoutx....
however, what i need is how to activate / call up from a form, via a command button, a hyperlink that is embedded in a hyperlink field of a record in, say, table "A", that is not the database default of the form, say table "B", but the record in table "A" is related to the one on the form by customer code...
the hyperlinks in table "A" are linked to a quite lengthy word.docs
im not sure if im making any sense describing what the problem is.... id really appreciate any help...
many thanks.
llkhoutx
09-05-2007, 09:39 AM
You're making perfect sense.
Like I said, "WORD AUTOMATION" is what you're looking for.
I have some code in a program at home. I'll send it this evening.
llkhoutx
09-05-2007, 04:27 PM
My code was several computers ago and I couldn't find it.
Try this (http://www.access-programmers.co.uk/forums/archive/index.php/t-73934.html).
jhillbh
09-06-2007, 09:18 AM
HMACHAN, I had to do something close to this except open an .exe. I couldn't use VBA to to it directly from the command button, so i used a hidden text box(Hyperlink) that had;
=DLookUp("[YourColumn]","YourTable","YourTable.[FieldNeededToMatch]=" & [FieldNeedToMatch])
Then in the ClickEvent of the Button I used;
Dim sFileName As String
sFileName = [Hyperlink]
If IsNull(sFileName) Then 'MsgBox "Sorry, Base Rate not Set Up!", vbOKOnly'
Else
Application.FollowHyperlink sFileName
End If
Hopefully that leads you in the right direction.
hmachan
09-08-2007, 09:30 AM
THANK YOU SO MUCH JHILLBH...
With a few edits the code worked welll....
many many thanks...