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,servertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();

Any suggestions?

0
11/15/2006 5:21:22 PM
outlook 87535 articles. 11 followers. Follow

4 Replies
420 Views

Similar Articles

[PageSpeed] 30

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/details.aspx?familyid=3D2714320d-c997-=
4de1-986f-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.=20

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/community/en-us/default.mspx?dg=3Dmicroso=
ft.public.outlook.program_vba

--=20
Sue Mosher, Outlook MVP
   Author of Configuring Microsoft Outlook 2003
     http://www.turtleflock.com/olconfig/index.htm
   and Microsoft Outlook Programming - Jumpstart for=20
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx
  =20
"Brian Hampson" <brian.hampson@gmail.com> wrote in message =
news:1163611281.303036.273500@h48g2000cwc.googlegroups.com...
>I recently upgraded to Outlook 2007 B2TR and have found that I can no
> longer code against MAPI.DLL  It's gone :(
>=20
> 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?
>=20
> Here's what I had that worked until Outlook 2007 came around:
>=20
> SessionClass session =3D new MAPI.SessionClass();
> =
session.Logon(Missing.Value,Missing.Value,Missing.Value,Missing.Value,Mis=
sing.Value,Missing.Value,servertxt.Text+"\n"+mailboxtxt.Text);
> session.OutOfOffice=3D !this.checkBoxIn.Checked;
> session.OutOfOfficeText =3D this.OOOtxt.Text;
> session.Logoff();
>=20
> Any suggestions?
>
0
suemvp (4038)
11/15/2006 5:40:05 PM
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]" <suemvp@outlookcode.com> wrote in message 
news:ucYEy8NCHHA.204@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/details.aspx?familyid=2714320d-c997-4de1-986f-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/community/en-us/default.mspx?dg=microsoft.public.outlook.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
 

0
kenslovak (742)
11/15/2006 6:09:57 PM
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/details.aspx?familyid=2714320d-c997-4de1-986f-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/community/en-us/default.mspx?dg=microsoft.public.outlook.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" <brian.hampson@gmail.com> wrote in message news:1163611281.303036.273500@h48g2000cwc.googlegroups.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,servertxt.Text+"\n"+mailboxtxt.Text);
> > session.OutOfOffice= !this.checkBoxIn.Checked;
> > session.OutOfOfficeText = this.OOOtxt.Text;
> > session.Logoff();
> > 
> > Any suggestions?
> >

0
11/15/2006 6:19:10 PM
> 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.=20

> 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.=20

> 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.=20

> 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.=20

--=20
Sue Mosher, Outlook MVP
   Author of Configuring Microsoft Outlook 2003
     http://www.turtleflock.com/olconfig/index.htm
   and Microsoft Outlook Programming - Jumpstart for=20
     Administrators, Power Users, and Developers
     http://www.outlookcode.com/jumpstart.aspx
  =20
"Brian Hampson" <brian.hampson@gmail.com> wrote in message =
news:1163614750.684158.194330@f16g2000cwb.googlegroups.com...
> Thanks for the quick reply Sue,
>=20
> 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.
>=20
> I just tried to install the CDO.... "Cannot install CDO with Exchange"
> I have the Exchange Admin Tools installed :(
>=20
> 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.
>=20
> Has ANYONE found where the OutOfOffice is hiding in the "New World
> Order" that is Outlook 2007's dlls?
>=20
> 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/details.aspx?familyid=3D2714320d-c997-=
4de1-986f-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/community/en-us/default.mspx?dg=3Dmicroso=
ft.public.outlook.program_vba

>>
>> "Brian Hampson" <brian.hampson@gmail.com> wrote in message =
news:1163611281.303036.273500@h48g2000cwc.googlegroups.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 =3D new MAPI.SessionClass();
>> > =
session.Logon(Missing.Value,Missing.Value,Missing.Value,Missing.Value,Mis=
sing.Value,Missing.Value,servertxt.Text+"\n"+mailboxtxt.Text);
>> > session.OutOfOffice=3D !this.checkBoxIn.Checked;
>> > session.OutOfOfficeText =3D this.OOOtxt.Text;
>> > session.Logoff();
>> >=20
>> > Any suggestions?
>> >
>
0
suemvp (4038)
11/15/2006 7:00:42 PM
Reply:

Similar Artilces:

Code of searchforrecord 2007
I am having trouble with the code for the following task Table: Master List Form: Home Form: Details I am trying to get a button on 'Home' that will search a field in 'Master List' called ID for a value that I input in a text box on 'Home' and return that record in the form 'Details' for editting. Please HELP Is Details a subform of Home? If not, is Details already open or does it open from the button? Is Master List the row source for the Details form? If you can answer these questions, I can show you how it is done. -- Dave Hargis, Microsoft Access MVP ...

Outlook Archive NOT using Modified date
Is there anyway to force Archive to look at sent or received and not consider the modified date to archive items. We put in a new server and migrated all the mail to the new server so now the modified date on all emails has changed to that date. Now everything looks only a couple of months old even email from 2 and 3 years ago. I need to get archive to ignore the modified date. Any way to do this? No. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engine...

How to change name of company in Money 2007
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C9BBB5.64E4CA00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello everyone, I have a typo in the name of my company in MS Money 2007. I can't find = where to change it. Can anyone point me in the right direction. Thank you in advance for your help. Kevin ------=_NextPart_000_0010_01C9BBB5.64E4CA00 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transit...

Outlook 2007 graphics not displayed
I have installed Office Enterprise 2007 and use Outlook as my defauly mail application. Unfortunately it does not display the graphics in HTML messages des[ite all the necessary switched allowing downloading of graphics being ticked. I am also have a problem with IE 6 which does not function. Can this be related to this or is there a solution. TGhanks Trevor It's probably related - start by emptying the temp internet files (IE's tools, options menu) and if that doesn't help, report back and include exactly what isn't working in IE 6. -- Diane Poremsky [MVP - Ou...

scale to page error in Excel 2007
somehow something has changed in my Excel 2007 setup where my "fit to scale" does not work appropriately. When I choose print preview, the preview screen changes to a very small preview and my document is a few thousand pages. This document used to print fine on one page. Even on my other computer it prints fine. The funny thing is, when I change it back to 100% scale the preview is large again but still cuts off a few columns. I must have changed some setting that I need to reset but cannot find it. Any help is appreciated. Have you checked your setting of print ...

Separators In OUTLOOK Tool Bars???
How do I pace a separator in an OUTLOOK tool bar? In outlook 2003: Right click on toolbar, and choose customize. Select the Commands tab, then click on the toolbar button you want to be to the right of the separator. Click on "modify selection", then on "Start a group". HTH Mark -----Original Message----- From: C. Davey Utter [mailto:cdutter@spamex.com] Posted At: 02 October 2005 19:57 Posted To: microsoft.public.outlook Conversation: Separators In OUTLOOK Tool Bars??? Subject: Separators In OUTLOOK Tool Bars??? How do I pace a separator in an OUTLOOK tool bar? --...

Rules-Outlook 2003-"on this machine only"
When I specify that I want to send a copy of all messages that I send in a specific account...i get the added cindition "on this machine only". I copy my pst file from machine a and b...I uderstand that I have to check to be sure that all rules are active after I copy from machine...but how do I get away from this unselected condition. Exactly the same thing happens when I specify that all messages that are received via a specific account be sent to a folder. ...

Problem sending emails from Outlook Express Ver6 NEVER MIND!
I am trying to use Outlook Express Ver6 instead of Eudora. I can't seem to send e-mails from it. When I send a test to myself I get the error: The message could not be sent because the server rejected the sender's e-mail address. The sender's e-mail address was (MY ADDRESS) .. Subject 'TEST', Account: 'incoming.verizon.net', Server: 'outgoing.verizon.net', Protocol: SMTP, Server Response: '550 5.7.1 Authentication Required', Port: 25, Secure(SSL): No, Server Error: 550, Error Number: 0x800CCC78 Can anyone suggest what is wrong? Must be something...

Outlook Message Handling Option stopped working after CRM install
After installing Microsoft CRM client, The feature in Outlook 2003 Tools-->Options-->Preferences-->Email Options-->Message Handling-->Choose 'Open the next item' in the dropdown, no longer works. The option can be selected but when a message is opened and deleted Outlook simply returns to the inbox rather then opening the next item as requested. ...

CRM 3
I have a client who wants to upgrade Outlook 2000 to 2003 but not the rest of the office suite, will this have any limitations or challenges in regards to the CRM 3 Outlook Desktop client? thank you Brad Brad, You should be fine to go ahead and do that. You may want to remove Outlook 2000 from the Office 2000 suite first and then do a fresh install of Outlook 2003, it might just minimise on possible complications HTH Ben Brad I would check with the Outlook MVPs too - there are many merging issues between Word and Outlook when you run disparate versions. -- Judy Gleeson [MVP ...

Separate Outlook installations or identities?
A colleague has Outlook 2003 installed on their machine and wants to set it up so she and her husband can access their own emails separately. Since they swap between the computers all the time, they don't want to faff around with separate Windows logins, and she says that on an old PC they simply had separate Outlook icons on the desktop, but neither she nor I know how this was set up. I'm guessing this is dealt with by creating a new profile, but I need a simple walkthrough for creating another Outlook profile, and then creating two distinct shortcuts which will link directly...

Help! Extract the subject of all mails in outlook to a text file
How can I extract the information, such as subject, sender, time of all the mails in my Inbox into a text file? ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ Switch to a table view that contains all the fields you need the information from, select all items, and press CTRL+C to copy. You should be able to paste the data in columns into a text file. Note that not all available fields will copy in this manner, but the ones you mentioned should work. -- Jocelyn Fior...

Outlook 2003
Is there a text file to edit on the computer for this list, opposed to doing it in outlook 2003? No. The list is still built dynamically when you add senders to the list. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. Due to the Swen virus, all e-mails sent to my actual account will be deleted w/out reading. After searching google.groups.com and finding no answer BoDEAN <jbo@not_a_valid_email_addy.com> asked: | Is there a text file to edit on the computer for this list, opposed to | doing it in outlook 2003? ...

To MS: bug report for Outlook 2003
Hello, I did not find any website to submit a bug report, so I use this newsgroup. Outlook 2003, german, all updates applied (22 july 05) Problems with rules: I have about 15 email accounts defined and about 30 rules. When I create a rule to move received email to an other folder, and when using 'Emails received on this account' this is not working problerly: For some rules the wrong account is used. When I edit the rule in the list a wrong account is displayed (and is used for the rule) but when I click to change the account, the correct account is dispalyed. I have imported 30...

Move Local Folders from Outlook Express to Outlook 2003
I received Office 2003 as a gift. I added a new email account in Outlook 2003, so hopefully my mail will stop going to Outlook Express and start arriving at Outlook 2003. Can I move my local folders from Outlook Express to Outlook 2003. If so how. Bob J ...

Outlook / Exchange 2003 user connection problem
Ok, we are doing our Outlook configuration in a two step process first we add the Computer to the domain ( not the user ). Then we configure Outlook with the exchange server and user information. All of our users are created and have a default password. Problem is that when we go to setup Outlook we are only able to setup 2 - 5 computers a day. After we get 2 - 5 setup, when we try to install/configue another Outlook client we receive a message that say Cannot connect to Exchange server or Exchange server does not exist. But if we wait a day and go back to setting up Outlook again we are ab...

Transferring email addresses from Access to Outlook address book
Is there a way of transferring a list of email addresses with their contact names from an Access Database Table to my Outlook? ...

Norton Antispam, Outlook and non standard POP3 and SMTP ports
I had two windows XP computers, 1 - xp home, outlook 2003, NIS 2006, Norton antispam 2 - xp home, outlook 2002, nis 2005, Norton antispam Comcast just changed the incoming and outgoing ports to nonstand ports (ie not 25 and 110). As soon as I made the change to oulook, I was getting an message when outlook tried to load. The only way to get outlook to load properly was to disable the Norton antispam add on. My suspicion is that the NIS/NAS/OUTLOOK combo does not work with ports other than the standard pop3 and SMTP ports. I did get all of the latest updates for NIS and both systems are fu...

Problem sending e-mails with Outlook & SBC Yahoo DSL
I have been unable to fix a problem and am looking for help. I have Outlook 2000. I also have SBC Yahoo DSL. I have spent hours on the phone trying to fix this problem, reloaded my software, etc. I can recieve e-mail from the SBC Yahoo DSL server with my Outlook, but cannot send e- mails. The error message I get is 0x800ccc0f. I know this means the outgoing mail server does not recognize and log me in, but does anyone know a way to change this? SBC made sure my settings were correct, but the problem persists. They claim it is an Outlook problem, but it never happened with other ISP...

opening a word 2003 document with word 2007
I created some documents on Word 2003 and have been unable to open them with Word 2007. I tried saving them as .docx and .rtf on Word 2003 with no luck. The posts that I have seen thus far have not helped. Does anyone have any suggestions? What happens when you try? Word 2007 should have no difficulty opening Word 2003 documents or RTF documents. Word 2003 can only save docx format if it has the compatibility pack installed. -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word...

Can't get third outlook account to show up
MS Outlook 2k3 This is frustrating me, I did the typical add email stuff and all went well, but now the email isnt showing up in my arranged list (arranging by accounts so I can view all my emails at the same time) When I try to send an email, however, I can choose this account from the accounts drop down menu, and it will send an email. any ideas? i've been searching forever. So you're using the Arrange By | E-mail Account view on your Inbox and you don't see this 3rd e-mail account as one of the groups? First, do you have any e-mails actually FROM that account to show? I...

Compatibility between Outlook 2003 and Exchange 5.5
Are there any compatibility issues between Outlook 2003 and Exchange 5.5? We installed about 30 PCs with Outlook 2003. We configured them to connect to our Exchange 5.5 server, NOT using "Cached Exchange Mode." When users switch from Calendar to Inbox and back or from Notes to Inbox and back, there is a noticeable delay--about 5-10 seconds--and we get a pop-up balloon in the systray that the client is trying to connect and retrieve information from the Exchange server. We are on a 100Mbps switched network and each client has 100Mbps connection on the PC. The server also has a 10...

ActiveSync with IPAQ 2002 & Outlook SP3 security message ???
I have a problem when syncing Outlook 2002 SP3 with Active=20 Sync. Sometimes a security message accurs. Anyone know how=20 to get rid of this message without compromising security. Regards Adam W. Kj=E6r Adam W. Kj�r <anonymous@discussions.microsoft.com> wrote: > I have a problem when syncing Outlook 2002 SP3 with Active > Sync. Sometimes a security message accurs. Anyone know how > to get rid of this message without compromising security. What version of Activesync? -- Brian Tillman ...

Configuring Outlook #2
Hai, I have to configure my outlook while working in my system everyday. I'm not able to view my mails which are sent to me the previous day or week. Please help me how do i configure my outlook in such a way that I get my mails regularly without any difficulty. send me a reply as soon as possible. regards, Solomon ...

how to modify the global address list path in outlook
hi, in my company we are using outlook 2003 US and FR with exchange 2003 US. when we re using outlook US, the global address list used is called "\Global Address List" and when we re using outlook FR, the global list is called "\Liste d'adresses globale" and this is 2 different lists. how can i modify this parameter in order the french version uses the "\Global Address List" path? thanks for your answer. hi, someone has an idea? regards, "plomkiolki" <plomkiolki@hotmail.com> wrote in message news:C0C7D73A-EFC4-4AF0-88DD-77F3B22AAEA8@m...