Hello kavita,

 

I don't have Outlook 2010 installed, but I checked the Outlook 2010 object
reference on MSDN @ and noticed MAPIFOLDER isn't listed at all.

 

At
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.map
ifolder.aspx it is specified as deprecated, and to use Folder instead.

 

It looks like Folder was instituted in Outlook 2007. (I'm not really
experienced with Outlook VBA).

Folder: http://msdn.microsoft.com/en-us/library/ff863890.aspx

Folder.Items: http://msdn.microsoft.com/en-us/library/ff864247.aspx

 

Asa

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of kavita ahuja
Sent: Monday, November 14, 2011 10:17 PM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Need help on Access VBA automating outlook

 

Hi Group members,

 

I have one access tool which is automating outlook. Earlier it was working
fine on all the systems in our team

but now our office version is migrated on office 2010.

Now when this code is running, it is giving error on some systems in our
team.

I am not able to find any solution on google.

 

Below is the code in which I am getting error.

Dim OLF As Outlook.MAPIFolder, olMailItem As Outlook.MailItem
Dim ToContact As Outlook.Recipient

 

Set OLF = GetObject("",
"Outlook.Application").GetNamespace("MAPI").GetDefaultFolder(olFolderInbox)
Set olMailItem = OLF.Items.Add ' creates a new e-mail message

 

Attached is the error message that I am getting.

 

Please help me in this scenario

 

Thanks & Regards,

Kavita

-- 
FORUM RULES (934+ members already BANNED for violation)
 
1) Use concise, accurate thread titles. Poor thread titles, like Please
Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will
not get quick attention or may not be answered.
 
2) Don't post a question in the thread of another member.
 
3) Don't post questions regarding breaking or bypassing any security
measure.
 
4) Acknowledge the responses you receive, good or bad.
 
5) Cross-promotion of, or links to, forums competitive to this forum in
signatures are prohibited. 
 
NOTE : Don't ever post personal or confidential data in a workbook. Forum
owners and members are not responsible for any loss.
 
----------------------------------------------------------------------------
--------------------------
To post to this group, send email to excel-macros@googlegroups.com

-- 
FORUM RULES (934+ members already BANNED for violation)

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.

2) Don't post a question in the thread of another member.

3) Don't post questions regarding breaking or bypassing any security measure.

4) Acknowledge the responses you receive, good or bad.

5)  Cross-promotion of, or links to, forums competitive to this forum in 
signatures are prohibited. 

NOTE  : Don't ever post personal or confidential data in a workbook. Forum 
owners and members are not responsible for any loss.

------------------------------------------------------------------------------------------------------
To post to this group, send email to excel-macros@googlegroups.com

Reply via email to