Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linking Individual Records to Individual Word documents.

Status
Not open for further replies.

Mannstech

IS-IT--Management
Oct 26, 2005
65
GB
Hi, I wonder if anyone can help?

I have a simple Access 2007 database of employees that I need to link to individual employee information saved as Word documents. Each employee has a unique record in the database and simply needs a link through to their unique Word document.

I understand that to embedd each document is not recommended as it bloats the database dramatically (and I have over 250 records to organise!) so could anyone help me with some simple instructions as to how to link to the relevant files?

Unfortunately I have very limited VB programming skills so any step-by-step instructions would be gratefully received!

Thanks & regards.

Mannstech
 
Mannstech . . .

Have a look at the Follow HyperLink method ...

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Thanks for those links but I'm not sure what you're trying to say...

For your information, I spent a good couple of hours Googling the problem to see if I could solve it myself. I couldn't. Hence I thought I'd ask my helpful colleagues at Tek-Tips.

My apologies if you feel I haven't tried hard enough...
 
Mannstech . . .

In the employee's table and a textfield for holding the path & file name.

Then your form use FollowHyperlink to open the form. Review FollowHyperlink in access VBA help.

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Mannstech, you ask for "step-by-step instructions". This may be intrepreted as "do it for me". Tek-tips isn't meant to do other peoples work. We have our own work to do. We supply helpful directions and then the questioner takes the initiative to explore that path.
Nine years ago I had to solve this problem, too. I didn't know about Tek-tips. So I looked through some Access books. Lo and Behold, I found the solution that I've now use these many years. This is just one way to do it. You can also use Hyperlinks.
Store the Word docs' names - I called my procedureA, procedureB, etc. and kept them in the same folder. Then on a form I had a button, which when clicked, took the Word Doc's name displayed on the form, and opened the appropriate Word Doc. Here's that code: You will see that the Click event calls the GetInstrPro subroutine that fetches the document.

Sub GetInstrPro(Instpro)
Dim appWord As Word.Application
Dim wd As String
On Error Resume Next
wd = "c:" & "\" & Instpro & ""
AppActivate "Microsoft Word"
If Err Then
Shell "c:\Program Files\Microsoft Office\Office\Winword /Automation", vbMaximizedFocus
AppActivate "Microsoft Word"
End If
On Error GoTo 0
Set appWord = GetObject(, "Word.Application")
With appWord
.Visible = True
.Documents.Open Filename:=wd
.ActiveDocument.ShowSpellingErrors = False
End With
Set appWord = Nothing
End Sub

Private Sub Procedure_Click()
DoCmd.Hourglass True
GetInstrPro Instpro:=Me![calibration information.Procedure]
DoCmd.Hourglass False
End Sub

Procedure is the name of the Word Doc.
 
Fair comment, and my apologies if I've mislead anyone with my request. In my defence, I always try to solve a problem myself before asking for help. I quite appreciate that we all have our own work to do but it seems silly to "re-invent the wheel" if the solution already exists.

Anyway, you've both given me some helpful tips, so thank you for that. I suppose the next step is to get some coding skills under my belt!

Thanks again.

Mannstech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top