[AccessD] Open Word Document

Bryan Carbonnell Bryan_Carbonnell at cbc.ca
Wed Nov 5 14:45:08 CST 2003


Here is some Quick & Dirty code:

dim objWord as Object

set objWord = CreateObject("Word.Application")
objWord.visible = true

objWord.Documents.Open "C:\FullPath\to\DocToOpen.doc",,True

set objWord = Nothing

No references to the Word TypeLibrary are needed.

THe True in this line:
objWord.Documents.Open "C:\FullPath\to\DocToOpen.doc",,True

Tells Word to open the document as read only.

Bryan Carbonnell
bryan_carbonnell at cbc.ca

>>> HollisVJ at pgdp.usec.com 05-Nov-03 3:28:55 PM >>>
How do you open a Word Document from a form?
 
I have an instruction guide in Word that I would like to access from a
form
& have the Word document open Read Only. I tried a hyperlink, but could
not
find the properties to open the document read-only. I know I could set
the
document properties to read-only, but looking for a different way to
open
and set the properties.
 
Virginia


More information about the AccessD mailing list