use absolute paths in Access

G

Guest

How can I retrieve the absolute path from a word document on my PC, save it
in a (hyperlink or ole-type) field and later get the right program to open
when I click or double click on it?
 
G

Guest

Not quite sure what you mean. Do you mean absolute path for the document or
an absolute path within the document?
 
J

John Nurick

The FileSystemObject object has a GetAbsolutePathName method.

Once you've got a filespec you're happy with, you store it either in a
hyperlink field or a text field and bind a textbox to the field.

With a hyperlink field, that's all you need to do; clicking on the
textbox will then launch the document. With a text field, use something
like
Application.FollowHyperlink Me.ActiveControl.Value
in the textbox's DoubleClick event procedure, or
Application.FollowHyperlink Me.XXX.Value
in a button's Click event (where XXX is the name of the textbox).
 

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