P
Peter Moffatt
I wish to use an unbound object frame to display a linked Word document
in a report, and to be able to change the source document in code.
Including the following code in the Report_Open procedure produces the
error message "The object frame you tried to edit doesn't contain an OLE
object".
With linkframe
.Class = "Word.Document.8"
.OLETypeAllowed = acOLEEither
.SourceDoc = "e:\documents\test.doc"
.action = acOLECreateLink
End With
The same code seems to work perfectly well with an unbound object frame
on a form. In the case of the report, although the frame is created as
linked and its OLEType shows as linked in the property sheet, the
OLEType seems at some stage to get changed to 3 (none), and I imagine it
could be this setting which causes the error.
Can anyone shed any light on this please?
Peter Moffatt.
in a report, and to be able to change the source document in code.
Including the following code in the Report_Open procedure produces the
error message "The object frame you tried to edit doesn't contain an OLE
object".
With linkframe
.Class = "Word.Document.8"
.OLETypeAllowed = acOLEEither
.SourceDoc = "e:\documents\test.doc"
.action = acOLECreateLink
End With
The same code seems to work perfectly well with an unbound object frame
on a form. In the case of the report, although the frame is created as
linked and its OLEType shows as linked in the property sheet, the
OLEType seems at some stage to get changed to 3 (none), and I imagine it
could be this setting which causes the error.
Can anyone shed any light on this please?
Peter Moffatt.