Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations danielledunham on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class outlook.application is not found

foxup

Programmer
Joined
Dec 14, 2010
Messages
339
Location
CA
Hi All,

We installed a new version of Outlook (https://apps.microsoft.com/detail/9nrx63209r7b?hl=en-US&gl=US)

and this code doesn't work anymore (from the 1st line, it gives me an error) of "class outlook.application is not found"

oOutlook = CreateObject("Outlook.Application")
oitem=oOutlook .createitem(0)
oitem.subject="Email From VFP"

oitem.to="someone@example.com"

oitem.body="Testing testing 1234"
* for HTML mail there is simply oItem.HTMLBody to put in any HTML

** To attach a file
**oitem.Attachments.Add("MyFullPath+MyFile+Ext")
** to attach one more file.. and you can repeat this.
* oitem.Attachments.Add("MyFullPath+MyFile+Ext")

** to send it
oitem.send()

** to clear up
oOutlook=.null.

Any help please?

Thanks,
FOXUP
 

Part and Inventory Search

Sponsor

Back
Top