Peter Paul
Registered User.
- Local time
- Today, 18:35
- Joined
- Jan 1, 2000
- Messages
- 82
I am trying to automate an OLE to open into a Word document. I am stealing the code from a book, but cannot get it to work.
The code is:
On Error GoTo AddTextErr
Comments.Class = "Word.Document"
Comments.OLETypeAllowed = acOLEEmbedded
Comments.Action = acOLECreateEmbed
Comments.Action = acOLEActivate
AddTextErr:
MsgBox Error$ Chr$(12) & "Unable to embed word document"
Resume AddText
AddText:
The first error I am getting is on Comments, states that the command is not recognized.
Any suggestions would be much appreciated,
Peter Paul
The code is:
On Error GoTo AddTextErr
Comments.Class = "Word.Document"
Comments.OLETypeAllowed = acOLEEmbedded
Comments.Action = acOLECreateEmbed
Comments.Action = acOLEActivate
AddTextErr:
MsgBox Error$ Chr$(12) & "Unable to embed word document"
Resume AddText
AddText:
The first error I am getting is on Comments, states that the command is not recognized.
Any suggestions would be much appreciated,
Peter Paul