473,729 Members | 2,141 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Offic e.Core and Microsoft.Offic e.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.SessionCla ss();
session.Logon(M issing.Value,Mi ssing.Value,Mis sing.Value,Miss ing.Value,Missi ng.Value,Missin g.Value,servert xt.Text+"\n"+ma ilboxtxt.Text);
session.OutOfOf fice= !this.checkBoxI n.Checked;
session.OutOfOf ficeText = this.OOOtxt.Tex t;
session.Logoff( );

Any suggestions?

Nov 15 '06 #1
4 15069
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 PropertyAccesso r objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmaticall y modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.publi c.outlook.progr am_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.goo glegroups.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.Offic e.Core and Microsoft.Offic e.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.SessionCla ss();
session.Logon(M issing.Value,Mi ssing.Value,Mis sing.Value,Miss ing.Value,Missi ng.Value,Missin g.Value,servert xt.Text+"\n"+ma ilboxtxt.Text);
session.OutOfOf fice= !this.checkBoxI n.Checked;
session.OutOfOf ficeText = this.OOOtxt.Tex t;
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.PropertyA ccessor object with this proptag:

"http://schemas.microso ft.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****@outlook code.comwrote in message
news:uc******** *****@TK2MSFTNG P04.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 PropertyAccesso r objects. Tools like
Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and
properties. I haven't tried to programmaticall y modify the OOA items yet,
though.

FYI, there is a newsgroup specifically for general Outlook programming
issues "down the hall" at microsoft.publi c.outlook.progr am_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.dl l
(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 PropertyAccesso r objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmaticall y modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.publi c.outlook.progr am_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.goo glegroups.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.Offic e.Core and Microsoft.Offic e.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.SessionCla ss();
session.Logon(M issing.Value,Mi ssing.Value,Mis sing.Value,Miss ing.Value,Missi ng.Value,Missin g.Value,servert xt.Text+"\n"+ma ilboxtxt.Text);
session.OutOfOf fice= !this.checkBoxI n.Checked;
session.OutOfOf ficeText = this.OOOtxt.Tex t;
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.publi c.outlook, which is for usage questions, not developer questions.
I'm pretty sure it was MAPI.dll as I have an Interop.MAPI.dl l
(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.goo glegroups.com.. .
Thanks for the quick reply Sue,

I'm pretty sure it was MAPI.dll as I have an Interop.MAPI.dl l
(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 PropertyAccesso r objects. Tools like Outlook Spy and MFCMAPI.exe can help you locate the right hidden items and properties. I haven't tried to programmaticall y modify the OOA items yet, though.

FYI, there is a newsgroup specifically for general Outlook programming issues "down the hall" at microsoft.publi c.outlook.progr am_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.goo glegroups.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.Offic e.Core and Microsoft.Offic e.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.SessionCla ss();
session.Logon(M issing.Value,Mi ssing.Value,Mis sing.Value,Miss ing.Value,Missi ng.Value,Missin g.Value,servert xt.Text+"\n"+ma ilboxtxt.Text);
session.OutOfOf fice= !this.checkBoxI n.Checked;
session.OutOfOf ficeText = this.OOOtxt.Tex t;
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
8139
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 Outlook Express 6 and Thunderbird 1.5, but it doens't work at all with Microsoft Outlook 2007. I keep getting this message: "WindowsError: MAPI error 2". I don't want to use Extended MAPI because it doesn't support thunderbird not OE. Therefore,...
0
1260
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 receive messages. I do not receive any error messages to make it easier to troubleshoot why I am unable to receive my messages through Outlook. It appears that this is a problem that many are having and there aren't any solutions. Anyone know the...
2
2455
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 outlook.interop.dll to import. Are there any dll gurus out there who can help me get this up and running with Outlook 2007? I am using VS 2005.
0
1276
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 proceed. The development machine has Office 2007 installed but as production machines have Outlook 2003 therefore Outlook 2003 project template is selected for this solution. How can I avoid the conversion of the project?
3
3389
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 working solution for that :( thanks for any help Volkan
1
2192
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... (250/289)" or "databinding...". I have ended the task in the Task Manager" and rebooted several time but I keep getting the same results.
0
3266
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 text at 69 characters on Tools | Options | Mail Format | Internet Format | Plain text options. Outlook does not seem to honor this setting. I tried various different encodings for the message including US-ASCII. On advice from a Microsoft page...
4
6460
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 code... sending an email by hand - everything works as expected (rules, VBA, etc are all applied). sending an email from code (C#, external VBA, etc) has the messages saving in Sent Items regardless of any other settings or configurations (up to...
0
1313
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, it’s gone forever. Apparently there is a setting in MS Outlook that I need to change so that the email is moved to the “Deleted” folder under both conditions. I've searched Google and my own version of Outlook 2007 (I use Thunderbird so I don't have...
0
8764
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9428
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9289
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8159
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6722
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6026
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4534
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4798
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2694
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.