ActiveX & Word files

option

Registered User.
Local time
Today, 13:51
Joined
Jul 3, 2008
Messages
143
Hey guys,

Does anyone happen to know what ActiveX control to use to view .doc files in Access? Or if there is a better way to handle this, that'd work too. I've been searching around and got nothing. Thanks!

**edit**

You know, if I had spent just a few more minutes searching, I'd have come across this:

Code:
Option Compare Database
Option Explicit
Const stRoot As String = "C:\Documents and Settings\carra12\Desktop\New Folder\TEST\"

Private Sub Form_Current()
Dim stFile As String
stFile = stRoot & Me.txtFile

If Dir(stFile) <> "" Then
    With Me!OLEUnbound7
        .Enabled = True
        .Locked = False
        .OLETypeAllowed = acOLEEmbedded
        .SourceDoc = stFile
        .Action = acOLECreateEmbed
        .SizeMode = acOLESizeStretch
        .Activate
    End With
Else
    MsgBox "No linked doc"
End If

End Sub

PROBLEM SOLVED!
 
Last edited:
The only problem with your solution is that it willonly work on your machine or a mchine that you are logged into.

your Const stRoot proves that.

Also why are you embedding the word doc in your table when you can just link it and view it via a hyper link.

David
 

Users who are viewing this thread

Back
Top Bottom