mapi

Outlook Mapi access shared contacts

∥☆過路亽.° 提交于 2019-12-04 03:14:03
I want to import contacts from Outllok via Mapi. First step with standard contact is no problem: MAPIFolder contactObjects = outlookObj.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts); foreach (ContactItem contactObject in contactObjects.Items) { ... import contact ... } In a second step I additionally want to import shared contacts. Only thing I found was using OpenSharedItem(sharedContacts.vcf) but I don't know the name of the file (shared item) I want to open. Does someone know how to access shared contacts and can help me out? Tobi Update: Thanks for the hint with the vcf-Files

System.Runtime.InteropServices.COMException (0x800706BE) when getting contact.LastName

只愿长相守 提交于 2019-12-03 20:13:03
Some of our users are getting this exception sometimes (not for every contact): System.Runtime.InteropServices.COMException (0x800706BE): The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at Microsoft.Office.Interop.Outlook._ContactItem.get_LastName() This happens when we're trying to get the last name of a contact (of the ContactItem type). Does anybody know what the problem is? Any help would be appreciated. Thanks! It is a Windows error, facility code 7. The last word gives the Windows error, 0x6be == 1726: // MessageId: RPC_S_CALL_FAILED // // MessageText: // // The

How to open new email with attachment in Windows 10 Mail App

↘锁芯ラ 提交于 2019-12-03 06:50:25
问题 I am trying to add a feature to my C# / .Net app for a user to email a file. When a user has Outlook installed, I can successfully use the Outlook interop APIs to do exactly what I want. However on a new Windows 10 install, I cannot work out how to open an email with an attachment in the default Mail app, which is from the Windows Store. I have tried: Using EML files, as per https://stackoverflow.com/a/25586282/2102158 The Mail app does not register itself to open EML files Using the MAPI32

Is it OK to install CDO 1.21 with Exchange Server 2010 SP3/ Windows Server 2012?

久未见 提交于 2019-12-02 17:56:16
问题 We are upgrading our server to Windows 2012 from 2003. Our application use CDO 1.21 and MAPI to send mails, I know I have to use SMTP/ OOM/AWS. At this late stage I don't want to do make changes in our programs right now - there are 80+ :) When I am going to MS site to download CDO 1.21, Windows 2102/Exchange Server 2010 SP3 is not specified under supported platforms. I am able to download CDO 1.21 for Win 2012. But now when I am connecting via MAPI, System is throwing error: The information

Outlook Redemption - using RedemptionLoader without regsvr32 the DLL

随声附和 提交于 2019-12-02 13:19:52
I want to use the mail functions without registering the COM dll (regsvr32). I followed the informations from: http://www.dimastr.com/redemption/security.htm#redemptionloader so i initialize the dll with private Redemption.SafeMailItem safeMail = Redemption.RedemptionLoader.new_SafeMailItem(); which shows the Eval-Popup. All good. But when i assign the outlook mail item to the object safeMail.Item = mail; // of type Microsoft.Office.Interop.Outlook.MailItem then this exception appears: Unable to cast COM object of type 'System.__ComObject' to interface type 'Redemption.ISafeMailItem'. This

C++ MAPI: MAPILogonEx, how to open default mail inbox?

烈酒焚心 提交于 2019-12-02 07:16:09
问题 I want to login to my default mail inbox via: MAPILogonEx(0, profileName, NULL, MAPI_LOGON_UI, &lpMAPISession) where I defined profileName as: LPTSTR profileName = _T("Default"); However this doesn't work and tells me that I supplied an invalid profilename. What would be the correct value for the variable profileName to login to the default mail inbox? 回答1: Its actually really easy once you know... but you can also waste half a day on it.. Just call: MAPILogonEx(0, 0, NULL, MAPI_LOGON_UI |

How to get email address from the emails inside an Oulook folder via PowerShell?

落花浮王杯 提交于 2019-12-02 05:36:29
问题 I have an Outlook folder, let's call it LoremIpsum , where I have more than 1000+ email drafts that I want to enumarate and do some filtering via PowerShell. I can access the folder and see the emails already, using this script: Function HandleRemaining { [CmdletBinding()] Param() BEGIN { Clear-Host } PROCESS { $outlook = New-Object -ComObject outlook.application $mapi = $outlook.getnamespace("MAPI"); $email = $mapi.Folders.Item(1).Folders.Item('LoremIpsum').Items(1) foreach ($recip in $email

Get named MAPI Property from MailItem in C#

时光毁灭记忆、已成空白 提交于 2019-12-02 02:56:40
问题 I'm developing an Outlook 2010 custom plugin in C#. This is my first time using C# (I'm a java guy normally). There is a named (custom) MAPI property on a message that I would like to access and am having trouble doing so. My understanding is that in Outlook 2007 the PropertyAccessor object was introduced which allows easy access to named MAPI properties. I followed the instructions from the following documentation: http://msdn.microsoft.com/en-us/library/ff868915.aspx I can see the named

C++ MAPI: MAPILogonEx, how to open default mail inbox?

断了今生、忘了曾经 提交于 2019-12-02 02:47:26
I want to login to my default mail inbox via: MAPILogonEx(0, profileName, NULL, MAPI_LOGON_UI, &lpMAPISession) where I defined profileName as: LPTSTR profileName = _T("Default"); However this doesn't work and tells me that I supplied an invalid profilename. What would be the correct value for the variable profileName to login to the default mail inbox? Its actually really easy once you know... but you can also waste half a day on it.. Just call: MAPILogonEx(0, 0, NULL, MAPI_LOGON_UI | MAPI_USE_DEFAULT , &lpMAPISession); I'm still unable to supply a profilename but the default one will do the

Get MAPI Folder in Outlook from Folder Path

醉酒当歌 提交于 2019-12-01 18:14:30
I am trying to use the function from on this page: http://www.outlookcode.com/d/code/getfolder.htm to use the folder path to navigate to a folder. (I will copy that code onto the bottom of this question--I used it as-is, unmodified at all.) The reason I need to use this is that the default inbox in Outlook is not the same as the inbox I need to be active. I know the path of the relevant inbox by right clicking on it and hit properties, and looking at location. This is the code I use: Set objOutlook = CreateObject("Outlook.Application", "localhost") Set objNamespace = objOutlook.GetNamespace(