Open OLE Word Doc (and GoTo Bookmark in Doc)

Jason1971

Registered User.
Local time
Today, 20:32
Joined
Jan 19, 2009
Messages
46
Hi,

I have a small Word doc (43kb) embedded(?) (not linked) as a record in an OLE field. I have a button on a form (record source = table containing Word doc), when clicked I want to open the Word doc.

Question 1:
What is the button's "on click" vba code to open this word doc?

Question 2:
I'd like to jump to a predefined bookmark in this Word doc. Can vba code do this?

Thank you for your help.
 
Hi,

I have a small Word doc (43kb) embedded(?) (not linked) as a record in an OLE field. I have a button on a form (record source = table containing Word doc), when clicked I want to open the Word doc.

Question 1:
What is the button's "on click" vba code to open this word doc?

Question 2:
I'd like to jump to a predefined bookmark in this Word doc. Can vba code do this?

Thank you for your help.

Answer #1: I do what you are asking about by storeing the Word file as a BLOB. I then have to extract the Word file to the local hard drive to work with it in any way.

See: Storing BLOB data ** scroll down to find it.



Answer#2: Yes. See: How to send the current record to Word
 
Thanks HiTechCoach...most helpful :).

I've also found the following works for part1:

1) Add the Word doc to a form as an embedded object in an Unbound Object Frame (tick: add "as icon")
2) Set this Unbound Object Frame (icon) to hidden
3) Button "on click" code:
Code:
Private Sub btnLaunchWordDoc_Click()
    With Me.OLEUnbound1  'Name of Unbound Object Frame
        .Action = acOLEActivate
        .Verb = acOLEVerbOpen
    End With
End Sub

(I'm still working on part2)
 

Users who are viewing this thread

Back
Top Bottom