![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi there
I'm still a complete amateur on outlook vba, so please bear with me. I use Outlook 2003 (that I recieved with a student package of Office) on a Windows 7 RC PC. I want to create a Macro that formats a mail as html. I found some example code on the internet, but it gives errors claiming not to recognize the objects: "Method or data member not found" in response to Application.ActiveInspector.CurrentItem.BodyForma t = olFormatPlain or "User-defined type not found" in response to Dim olMail As Outlook.MailItem Any ideas on how I can reach my goal to create a Macro that formats a mail as html or to address the errors? Thank you for reading my post! Pieka |
Ads |
#2
|
|||
|
|||
![]() That sounds like the code isn't running in Outlook but in another application. There you need to add a reference on Outlook to make its object model available: Click Tools/References, and add "Microsoft Outlook x Library". Also, 'Application' in VBA always refers to the Application of the host application. For instance, if the code runs in Excel, Application refers to the root object of Excel, not to the one of Outlook. That is you need to dim a variable as Outlook.Application, and set it to the right object. -- Best regards Michael Bauer - MVP Outlook Manage and share your categories: http://www.vboffice.net/product.html?pub=6&lang=en Am Sun, 21 Feb 2010 05:58:01 -0800 schrieb ninjaneer: Hi there I'm still a complete amateur on outlook vba, so please bear with me. I use Outlook 2003 (that I recieved with a student package of Office) on a Windows 7 RC PC. I want to create a Macro that formats a mail as html. I found some example code on the internet, but it gives errors claiming not to recognize the objects: "Method or data member not found" in response to Application.ActiveInspector.CurrentItem.BodyForm at = olFormatPlain or "User-defined type not found" in response to Dim olMail As Outlook.MailItem Any ideas on how I can reach my goal to create a Macro that formats a mail as html or to address the errors? Thank you for reading my post! Pieka |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook doesn't recognise imported Contact's language | zeus911 | Outlook - Using Contacts | 1 | December 2nd 09 12:46 PM |
Outlook2003 does not recognise his products | Giamber | Outlook - General Queries | 4 | May 17th 09 10:41 PM |
How do I make Outlook recognise my country code? | Mirror Fish | Outlook - Using Contacts | 2 | November 20th 07 11:45 AM |
E-Mail Doesn't recognise my distribution list. | DarrenS | Outlook - Using Contacts | 9 | April 30th 07 09:22 AM |
how do I get active sync to recognise outlook | wath angling center | Outlook - Using Contacts | 1 | August 21st 06 04:44 PM |