Changing Doc Source on Unbound OLE control at Runtime

D

DDJ

We have created an Access report that contains an unbound OLE control which
is intended to hold a Word document supplied by our users with their
letterhead. After installation, we expect our users to provide us with a
path to the document containing their letterhead, then update the OLE
control and (probably) never have to update the control again.

Our app is written in VB6 and we have tried any number of diiferent
approaches to getting the OLE control to update for a new source document,
without success. We are able to change the SourceDoc, Class, etc.
properties in code, but we can't get the OLE control to show the revised
letterheads when opening the Access report in code.

Our code pretty much reads as follows:

With Report.Controls("OLEUnbound77")
.Enabled = True
.Locked = False
.OLETypeAllowed = acOLEEmbedded
.Class = "Word.Document"
.SourceDoc = "C:\Temp\Letterhead.doc"
.Action = acOLECreateEmbed
End With

Can anyone see why we can't get the revised document to show in the control?

Thanks!

Dan
 

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