Discussion Locked

Open/save Word file to Access hyperlink

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
VBA code to open a Word template for edit. When clicking doc save, Word will prompt for file location and doc name, and the file location (full path with file name) will update into the hyperlink field on an Access form.

5 replies

by carquiza

Hi,

Why not try this code?

Insert this code on a button or hyperlink:

Sub Command_Click()
Set Word = CreateObject("word.application")
Word.Visible = True
Word.Documents.Open FileName:=App.Path & "\Name of Word Document File.doc"
End Sub

For Saveas its replaced Word.Documents.SaveAs Filename:.....
Hope this helps a bit.

Cheers,

Mel Arquiza
Home Page Design
http://hpd.welcome.to

This discussion is closed to new replies.