outlook

How to get SMTP address for exchange user quickly?

北战南征 提交于 2021-02-11 08:51:59
问题 The below is my code, the PrimarySmtpAddress use 50ms which need more than 15 s to load more 300 users. I am not familiar with Outlook API, and it seems this Property is the usual way to retrieve the SMTP address, but it is far too slow. Is there other way to retrieve the SMTP address or I use this property incorrectly? The .NetFramework is 3.5 Outlook Version is 2010 Microsoft.Office.Interop.Outlook is 12.0.0.0 Microsoft.Office.Interop.Outlook.NameSpace olNS = outlook.GetNamespace("MAPI");

Only get the latest reply text in an Outlook Email using VSTO and C#

心已入冬 提交于 2021-02-11 06:23:32
问题 I have gone through many links already but none of them seems to be working. My problem is that in an Outlook Add-In written using C# and VSTO, I am looking to capture the text of the latest Reply email to a thread. The problem is that all the properties on a MailItem object such as Body, HTMLBody etc give the entire text of the email including past replies. I am looking to somehow only get the most recent text. And I need to be able to do this considering multiple languages in an email. Here

Side loading an Outlook javascript add-in

安稳与你 提交于 2021-02-11 00:34:13
问题 I am having a horrible time getting started at creating an add-in for Outlook. I want to use the new html/javascript/manifest approach. I have been able to create a manifest and application which works great with outlook.live.com. Where I am completely getting stuck is with desktop Outlook. How do I install/debug my add-in with desktop Outlook? I cannot find anything in the UI which will let me add this style of add-in. Additionally the Microsoft documentation did not make things any clearer.

Outloook VBA macro to reply all with oft template

与世无争的帅哥 提交于 2021-02-10 18:00:38
问题 I have a macro built for VBA Outlook where I can reply all, using an attachment. This is the code: Sub Estimate() Dim origEmail As MailItem Dim replyEmail As MailItem Dim s() As String Dim add As String Set origEmail = Application.ActiveWindow.Selection.Item(1) Set replyEmail = Application.CreateItemFromTemplate("C:\template.oft") s = Split(origEmail.CC & ";" & replyEmail.CC, ";") replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.Reply.HTMLBody replyEmail.Subject = "RE: " + origEmail

Outloook VBA macro to reply all with oft template

烈酒焚心 提交于 2021-02-10 17:59:16
问题 I have a macro built for VBA Outlook where I can reply all, using an attachment. This is the code: Sub Estimate() Dim origEmail As MailItem Dim replyEmail As MailItem Dim s() As String Dim add As String Set origEmail = Application.ActiveWindow.Selection.Item(1) Set replyEmail = Application.CreateItemFromTemplate("C:\template.oft") s = Split(origEmail.CC & ";" & replyEmail.CC, ";") replyEmail.HTMLBody = replyEmail.HTMLBody & origEmail.Reply.HTMLBody replyEmail.Subject = "RE: " + origEmail

Sending letter from a specific mailbox

前提是你 提交于 2021-02-10 15:17:24
问题 I want to send a letter via Outlook (using Excel VBA). I need it to be from the department mailbox. Current code looks like this: Dim Outlookwindow As Outlook.Application Dim NewLetter As Outlook.MailItem Set Outlookwindow = New Outlook.Application Set NewLetter = Outlookwindow .CreateItem(olMailItem) With NewLetter .BodyFormat = olFormatHTML .Display .HTMLBody = "Stuff and more stuff" .To = "people" .CC = "more people" .Subject = "About stuff" .Send End With Is there a way to send from the

Sending letter from a specific mailbox

谁都会走 提交于 2021-02-10 15:17:14
问题 I want to send a letter via Outlook (using Excel VBA). I need it to be from the department mailbox. Current code looks like this: Dim Outlookwindow As Outlook.Application Dim NewLetter As Outlook.MailItem Set Outlookwindow = New Outlook.Application Set NewLetter = Outlookwindow .CreateItem(olMailItem) With NewLetter .BodyFormat = olFormatHTML .Display .HTMLBody = "Stuff and more stuff" .To = "people" .CC = "more people" .Subject = "About stuff" .Send End With Is there a way to send from the

Sending letter from a specific mailbox

戏子无情 提交于 2021-02-10 15:16:32
问题 I want to send a letter via Outlook (using Excel VBA). I need it to be from the department mailbox. Current code looks like this: Dim Outlookwindow As Outlook.Application Dim NewLetter As Outlook.MailItem Set Outlookwindow = New Outlook.Application Set NewLetter = Outlookwindow .CreateItem(olMailItem) With NewLetter .BodyFormat = olFormatHTML .Display .HTMLBody = "Stuff and more stuff" .To = "people" .CC = "more people" .Subject = "About stuff" .Send End With Is there a way to send from the

Disable warning about a program trying to send an email

时间秒杀一切 提交于 2021-02-10 14:41:03
问题 I send an email using Outlook 2010 with Access VBA. I get a warning from Microsoft Outlook about a program trying to send an email and I'm forced to push allow. I have the Microsoft Outlook Object Library 14 from the reference in VBA. In Outlook - Options - access through programin is marked on don't show warnings. I added the next entries in regedit Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\ <version>\Outlook\Security Value name: AdminSecurityMode Value type: REG_DWORD Value:

Disable warning about a program trying to send an email

感情迁移 提交于 2021-02-10 14:40:09
问题 I send an email using Outlook 2010 with Access VBA. I get a warning from Microsoft Outlook about a program trying to send an email and I'm forced to push allow. I have the Microsoft Outlook Object Library 14 from the reference in VBA. In Outlook - Options - access through programin is marked on don't show warnings. I added the next entries in regedit Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\ <version>\Outlook\Security Value name: AdminSecurityMode Value type: REG_DWORD Value: