File attachments

wiltshire

Registered User.
Local time
Today, 06:50
Joined
Feb 25, 2003
Messages
79
I am developing a database to control the documentation system within my company. It will control the procedures and who they are issued to.

I have the following code which opens a new Word file:

Option Compare Database

Private Sub word_button_Click()
On Error GoTo Err_word_button_Click

Dim oApp As Object

Set oApp = CreateObject("Word.Application")
oApp.Visible = True

Exit_word_button_Click:
Exit Sub

Err_word_button_Click:
MsgBox Err.Description
Resume Exit_word_button_Click

End Sub


However, I would like to open an existing file based on the value of a field. The name of the field will reside in the 'Title' field of a continuous forms view of a table called 'Procedures'. The actual procedures resids on a server drive called 'c:\Documents'

I am a bit of a Visual Basic virgin/muppet at the moment, so any help would be appreciated.
 
At the following post:

Search DB

I have attached a database (last post in the form). It contains 3 types of search examples. The one that you are looking for is the third (Search using a Common Dialog Box). It will allow you to search your computer (or a network computer) for a file, store the selected file in a Textbox, and by double clicking the textbox, open the document.

I hope I understood what you needed.

HTH
 
Thanks jfgambit

Almost there !!

Instead of searching for a file on a server and linking in via the text box, I'd like to have the link automatically created via a field in the table. The table will hold the names of all files in the system.

Nice bit of code though !
 
Ignore me - I'm a fool!

I've just had a better look at your tables etc. and they are what I want, each line holing a different hyperlink.

Thanks for stopping me pulling all my hair out.

This Forum is great, I can always rely on it whether it's a simple problem I just can't grasp or something I really haven't got a clue on.

Thanks
 

Users who are viewing this thread

Back
Top Bottom