Displaying Word Document in Field

S

Spiderman

Can I setup a field in Access that is a link to a Word document. In other
words, when I click on the field in the record, Word will launch with the
selected document?
 
M

Matthew

Yes - many ways. If the document is inserted into your
table as a linked OLE object into an OLE-type field. You
will be able to click on it in your table or form and it
will automatically open the document. This, however, has
the disadvantage of occupying a LOT of space in the
database. 100kb of docs takes over 500kb of space.

Better is to store the names and folder paths of the docs
in a table and then "shell" out to winword.exe when you
click on a command button.

I have a form which displays the file name and path and a
command button - and the following code in the on-click
event of the button :

Private Sub Command21_Click()
Dim strCmd As String

strCmd = """C:\Program Files\Common Files\Microsoft
Shared\PhotoEd\Photoed.exe"""
strCmd = strCmd & """" & Me![FilePathName] & """"
Shell strCmd
End Sub

My example is invoking Microsoft Photo Editor - replace
the command line with winword.exe and you are in business.

Matthew
 
R

Rhonda

Fred,

Do you know of any way to display a Word doc in a way where there is no Word
functionality on the screen, just the doc and a way to close it.

Rhonda
 
R

Rhonda

Matthew

Do you know of any way to display a Word doc in a way where there is no Word
functionality on the screen, just the doc and a way to close it.

Rhonda

Matthew said:
Yes - many ways. If the document is inserted into your
table as a linked OLE object into an OLE-type field. You
will be able to click on it in your table or form and it
will automatically open the document. This, however, has
the disadvantage of occupying a LOT of space in the
database. 100kb of docs takes over 500kb of space.

Better is to store the names and folder paths of the docs
in a table and then "shell" out to winword.exe when you
click on a command button.

I have a form which displays the file name and path and a
command button - and the following code in the on-click
event of the button :

Private Sub Command21_Click()
Dim strCmd As String

strCmd = """C:\Program Files\Common Files\Microsoft
Shared\PhotoEd\Photoed.exe"""
strCmd = strCmd & """" & Me![FilePathName] & """"
Shell strCmd
End Sub

My example is invoking Microsoft Photo Editor - replace
the command line with winword.exe and you are in business.

Matthew
-----Original Message-----
Can I setup a field in Access that is a link to a Word document. In other
words, when I click on the field in the record, Word will launch with the
selected document?


.
 
J

John Nurick

Hi Rhonda,

This question comes up quite often in the Word newsgroups, and the
consensus of the experts is (a) that there's no simple way of doing it,
and (b) that there's no way at all of doing it that cannot be
circumvented by an experienced user.

This is likely to change with future versions of Word that include
digital rights management features; but for now the best bet is probably
to convert the documents to PDF format, which (if you use Adobe Acrobat
or other suitable software to create the file) lets you prevent users
from editing, printing and copying the text.

Fred,

Do you know of any way to display a Word doc in a way where there is no Word
functionality on the screen, just the doc and a way to close it.

Rhonda

John Nurick [Microsoft Access MVP]

Please respond in the newgroup and not by email.
 

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