Open a Word Doc referenced in a form field

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I'm trying to set a button to open a word doc that is referenced in a
"DocName" field on my form. I've looked at several examples on this forum
but am unable to make it flow just right.

Are there any reference libraries I need to include? What is the most
efficient method to do this??

Thanx for your help
 
I'm trying to set a button to open a word doc that is referenced in a
"DocName" field on my form. I've looked at several examples on this forum
but am unable to make it flow just right.

Are there any reference libraries I need to include? What is the most
efficient method to do this??

Thanx for your help



All you need is to code a command button's click event:
If [DocName] stores just the document name only, i.e.
"WelcomeLetter.doc"

Application.FollowHyperlink "c:\PathToFolder\" & Me![DocName]

If the [DocName] field already includes the full path and document
name, then

Application.FollowHyperlink Me![DocName]
 

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

Back
Top