473,406 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

MAPI gone in Outlook 2007?

I recently upgraded to Outlook 2007 B2TR and have found that I can no
longer code against MAPI.DLL It's gone :(

Using C#, I used to get the MAPI session, and from that I could change
the out of office. No longer. Does anyone know how to do this using
the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that
are supposed to be the new replacements?

Here's what I had that worked until Outlook 2007 came around:

SessionClass session = new MAPI.SessionClass();
session.Logon(Missing.Value,Missing.Value,Missing. Value,Missing.Value,Missing.Value,Missing.Value,se rvertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();

Any suggestions?

Nov 15 '06 #1
4 15032
Do you mean CDO.dll? That's the MAPI class. CDO 1.21 is no longer distributed with Outlook, starting with Outlook 2007. It's available as a separate download from http://www.microsoft.com/downloads/d...f-24f081725d36

Most of the CDO 1.21 functionality is available from the Outlook 2007 object model using the new StorageItem and PropertyAccessor objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmatically modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm...ok.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Brian Hampson" <br***********@gmail.comwrote in message news:11**********************@h48g2000cwc.googlegr oups.com...
>I recently upgraded to Outlook 2007 B2TR and have found that I can no
longer code against MAPI.DLL It's gone :(

Using C#, I used to get the MAPI session, and from that I could change
the out of office. No longer. Does anyone know how to do this using
the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that
are supposed to be the new replacements?

Here's what I had that worked until Outlook 2007 came around:

SessionClass session = new MAPI.SessionClass();
session.Logon(Missing.Value,Missing.Value,Missing. Value,Missing.Value,Missing.Value,Missing.Value,se rvertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();

Any suggestions?
Nov 15 '06 #2
Stores are another major CDO collection now exposed in the OOM too.

I've done some OOF coding with Outlook 2007, it works OK.

There's no OutOfOffice or OutOfOfficeText exposed however. You have to work
with the raw properties.

For OOF state you'd use the Store.PropertyAccessor object with this proptag:

"http://schemas.microsoft.com/mapi/proptag/0x661D000B"

I'm not sure where the text is stored, it's not a property on the Store
object.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Sue Mosher [MVP-Outlook]" <su****@outlookcode.comwrote in message
news:uc*************@TK2MSFTNGP04.phx.gbl...
Do you mean CDO.dll? That's the MAPI class. CDO 1.21 is no longer
distributed with Outlook, starting with Outlook 2007. It's available as a
separate download from
http://www.microsoft.com/downloads/d...f-24f081725d36

Most of the CDO 1.21 functionality is available from the Outlook 2007 object
model using the new StorageItem and PropertyAccessor objects. Tools like
Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and
properties. I haven't tried to programmatically modify the OOA items yet,
though.

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.public.outlook.program_vba or, via web
interface, at
http://www.microsoft.com/office/comm...ok.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx
Nov 15 '06 #3
Thanks for the quick reply Sue,

I'm pretty sure it was MAPI.dll as I have an Interop.MAPI.dll
(1.21.0.0) in my old bin directory from when it worked.

I just tried to install the CDO.... "Cannot install CDO with Exchange"
I have the Exchange Admin Tools installed :(

I had a look at the Outlook.Program_VBA but it appears to be based on
using VBA WITHIN Outlook. I'm writing my code outside of Outlook as a
standalone app.

Has ANYONE found where the OutOfOffice is hiding in the "New World
Order" that is Outlook 2007's dlls?

Sue Mosher [MVP-Outlook] wrote:
Do you mean CDO.dll? That's the MAPI class. CDO 1.21 is no longer distributed with Outlook, starting with Outlook 2007. It's available as a separate download from http://www.microsoft.com/downloads/d...f-24f081725d36

Most of the CDO 1.21 functionality is available from the Outlook 2007 object model using the new StorageItem and PropertyAccessor objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmatically modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm...ok.program_vba

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Brian Hampson" <br***********@gmail.comwrote in message news:11**********************@h48g2000cwc.googlegr oups.com...
I recently upgraded to Outlook 2007 B2TR and have found that I can no
longer code against MAPI.DLL It's gone :(

Using C#, I used to get the MAPI session, and from that I could change
the out of office. No longer. Does anyone know how to do this using
the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that
are supposed to be the new replacements?

Here's what I had that worked until Outlook 2007 came around:

SessionClass session = new MAPI.SessionClass();
session.Logon(Missing.Value,Missing.Value,Missing. Value,Missing.Value,Missing.Value,Missing.Value,se rvertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();

Any suggestions?
Nov 15 '06 #4
I had a look at the Outlook.Program_VBA but it appears to be based on
using VBA WITHIN Outlook.
As I said, that is the main general programmability newsgroup for Outlook. You should post there, not in microsoft.public.outlook, which is for usage questions, not developer questions.
I'm pretty sure it was MAPI.dll as I have an Interop.MAPI.dll
(1.21.0.0) in my old bin directory from when it worked.
VS gives its own names to the PIAs it creates. The code you posted was definitely CDO 1.21 code.
I just tried to install the CDO.... "Cannot install CDO with Exchange"
I have the Exchange Admin Tools installed :(
Correct. They're incompatible. And while we're on the subject, CDO 1.21 is not supported in .NET languages in the first place. It might have worked for you, but it might blow up on a client.
Has ANYONE found where the OutOfOffice is hiding in the "New World
Order" that is Outlook 2007's dlls?
Outlook Spy shows the OOF rules themselves in the Inbox.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Brian Hampson" <br***********@gmail.comwrote in message news:11**********************@f16g2000cwb.googlegr oups.com...
Thanks for the quick reply Sue,

I'm pretty sure it was MAPI.dll as I have an Interop.MAPI.dll
(1.21.0.0) in my old bin directory from when it worked.

I just tried to install the CDO.... "Cannot install CDO with Exchange"
I have the Exchange Admin Tools installed :(

I had a look at the Outlook.Program_VBA but it appears to be based on
using VBA WITHIN Outlook. I'm writing my code outside of Outlook as a
standalone app.

Has ANYONE found where the OutOfOffice is hiding in the "New World
Order" that is Outlook 2007's dlls?

Sue Mosher [MVP-Outlook] wrote:
>Do you mean CDO.dll? That's the MAPI class. CDO 1.21 is no longer distributed with Outlook, starting with Outlook 2007. It's available as a separate download from http://www.microsoft.com/downloads/d...f-24f081725d36

Most of the CDO 1.21 functionality is available from the Outlook 2007 object model using the new StorageItem and PropertyAccessor objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmatically modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.public.outlook.program_vba or, via web interface, at http://www.microsoft.com/office/comm...ok.program_vba
>>
"Brian Hampson" <br***********@gmail.comwrote in message news:11**********************@h48g2000cwc.googlegr oups.com...
>I recently upgraded to Outlook 2007 B2TR and have found that I can no
longer code against MAPI.DLL It's gone :(

Using C#, I used to get the MAPI session, and from that I could change
the out of office. No longer. Does anyone know how to do this using
the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that
are supposed to be the new replacements?

Here's what I had that worked until Outlook 2007 came around:

SessionClass session = new MAPI.SessionClass();
session.Logon(Missing.Value,Missing.Value,Missing. Value,Missing.Value,Missing.Value,Missing.Value,se rvertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();

Any suggestions?
Nov 15 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tomer.ha | last post by:
Hi there, I'd like to send emails from a Python program using Simple MAPI. I've tried this code: http://mail.python.org/pipermail/python-list/2004-December/298066.html and it works well with...
0
by: =?Utf-8?B?Uy5IZXJy?= | last post by:
I am running Outlook 2007 using the most recent version of Outlook Connector on a Windows Vista operating system. I use the Windows Live Mail and can send messages from Outlook, but cannot...
2
by: Brad Isaac | last post by:
Hi, I have a working app that uses interop.outlook.dll to export items to Outlook calendar. I downloaded the Primary Interop Assemblies for Office 2k7 today and still cannot get a working...
0
by: John | last post by:
Hi An outlook 2003 add-in solution created in vs 2008 on a pc with outlook 2007 when re-opened in vs 2008 brings up the conversion wizard. Cancelling wizard closes solution and does not allow to...
3
by: Volkan Senguel | last post by:
Hi Is there a easy way to get the contacts (names and phonenumbers) from outlook without the message that someone is accessing outlook and how long the access can take? i have not found any...
1
by: =?Utf-8?B?ZHRvd24gT3V0bG9vayAyMDA3IGNyYXNo?= | last post by:
Outlook 2007 keeps freezing on startup. I am running Vista Home Premium. I need to get back to work- please HELP! Outlook will appear to start but it locks into "Updating cached messages......
0
by: lundmark | last post by:
When I send a plain-text message using Outook 2007, I want hard line breaks to be added to my outgoing message. I cannot seem to make this happen. I have configured Outlook to Automatically wrap...
4
by: infomage27 | last post by:
I have tried scripting this with rules and VBA, now trying with C# but still failing. (code is exploratory, so please excuse the terribleness) maybe someone here will show me the error of my...
0
by: dougancil | last post by:
I have a user who sent me this email this morning in regards to their email: If I delete it without opening it, it’s moved to the “Deleted Items” folder. If I delete it after it’s been opened,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.