Word MS Access Wordpad OLE objects

Joined
Jun 23, 2007
Messages
61
Reaction score
0
Hello everyone,

I have a general question about Wordpad OLE objects. I have the following code snippet:
Code:
		 Forms![FormLetters]!MyOle.Verb = -2
 		Forms![FormLetters]!MyOle.Action = 7
 		 Set Word_Obj = Forms![FormLetters]!MyOle.Object.Application.WordBasic
 
 Word_Obj.FileSaveAs ("c:\Letters\mydocument.rtf")
It opens up the OLE document and saves it to a directory. This will not work with a wordpad document however. I get the error "automation object does not comply with the file", or something to that effect. Makes perfect sense. But, how do I open up WORDPAD instead of the WordBasic object so I can use that program instead to save the file? I tried this:
Code:
Set Word_Obj = Forms![FormLetters]!MyOle.Object.Application.WordPad
but it did not work so well.

Thank you for any help!
 
Last edited:
We generally use Wordbasic for anything like this m8.

The main reason is as follows

Microsoft Security Bulletin MS07-011
Vulnerability in Microsoft OLE Dialog Could Allow Remote Code Execution (926436)
http://www.microsoft.com/technet/security/bulletin/ms07-011.mspx

It's possible that the fix prevents what your trying to do but without the entire code I can't tell you if that's the case.
(You have added the OLE object via the References bit in the IDE haven't you ?)
 
JaLing said:
We generally use Wordbasic for anything like this m8.

The main reason is as follows

Microsoft Security Bulletin MS07-011
Vulnerability in Microsoft OLE Dialog Could Allow Remote Code Execution (926436)
http://www.microsoft.com/technet/security/bulletin/ms07-011.mspx

It's possible that the fix prevents what your trying to do but without the entire code I can't tell you if that's the case.
(You have added the OLE object via the References bit in the IDE haven't you ?)
Well...for one thing, the article says that Vista is not affected. That is my OS. Are you saying that the WORDPAD syntax that I used before SHOULD work? If not, any other ideas?
 
Back
Top