outlook-2010

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

Delete automatic Signature from forwarded emails VBA macro

人走茶凉 提交于 2021-02-10 14:25:43
问题 Newbie Outlook VBA. intermediate Excel VBA. Windows 7 Professional, Outlook 2010 I have a script running from a rule that autoforwards all incoming emails. I need it as a rule because otherwise it will not forward the mails in the queue when Outlook loads. I would like to have the default signature deleted when the mails are forwarded. As the reply is "blank" it is unnecessary to have the sig appended. I have found some code that supposedly worked in Outlook 2007 from the MSDN site. It

Non-delivery reports and VBA script in Outlook 2010

独自空忆成欢 提交于 2021-01-28 04:15:19
问题 I have a Outlook 2010 VBA script that should scan the body of selected non-delivery reports in my inbox and generates a text report if they match certain regular expressions in the body. Recently the script stopped working and it seems like I can no longer access the .body of the selected objects (debug.print outputs a lot of question marks to the immediate window). The script still works fine for regular (not NDR) emails in my inbox. I also noticed that the non-delivery reports all of a

Outlook - programmatically modify email currently being composed/edited

Deadly 提交于 2020-08-09 09:13:35
问题 For valid personal reasons** I am trying to construct a macro that clears out the To, CC, Subject and Body of the email being replied to (in compose mode?). What I have below works on an email being READ, but it does not work on an email being MODIFIED/COMPOSED. What must be changed for the macro to work on an email being composed/edited? Sub ClearEmail() Dim olExplorer As Explorer Dim olSelection As Selection Dim email As MailItem Dim strSig As String, Sig As String Set olExplorer =

SenderEmailAddress property does not contain a standard email address for internal contacts

十年热恋 提交于 2020-02-27 07:43:19
问题 Background: Using an Outlook Rule to trigger a script, I want all of my email from certain high-visibility clients to open immediately upon receipt. I have successfully set up a rule that triggers when those clients send me email. It looks something like this: And I have successfully created a script that opens a reply to the email, depending on who sent it. It looks something like this: Sub OpenEmailImmediately(oEmail As Outlook.MailItem) Select Case oEmail.Sender Case "Jobs, Steve" oEmail

SenderEmailAddress property does not contain a standard email address for internal contacts

梦想的初衷 提交于 2020-02-27 07:41:00
问题 Background: Using an Outlook Rule to trigger a script, I want all of my email from certain high-visibility clients to open immediately upon receipt. I have successfully set up a rule that triggers when those clients send me email. It looks something like this: And I have successfully created a script that opens a reply to the email, depending on who sent it. It looks something like this: Sub OpenEmailImmediately(oEmail As Outlook.MailItem) Select Case oEmail.Sender Case "Jobs, Steve" oEmail

Create a contact in a non-default Outlook contact folder

不羁岁月 提交于 2020-01-25 18:44:29
问题 I would like to create a contact in a non-default Outlook contact folder with Excel VBA 2010. In this example, the folder name is “azerty”, located in \mypersonnal_pst\Contacts I tried: Dim myolApp As Outlook.Application Dim myNamespace As Outlook.Namespace Set myolApp = CreateObject("Outlook.Application") Set myNamespace = myolApp.GetNamespace("MAPI") Set Folder = myNamespace.GetDefaultFolder(olFolderContacts).Parent.Folders("azerty") Set objContact = myolApp.CreateItem(olContactItem) With

PHP send multiple event requests in one email to Outlook

大憨熊 提交于 2020-01-24 22:24:10
问题 I have tried below code & was able to send multiple events in one embedded ics to google calendar. But if I open the same mail in MS Outlook 2010 only the first date is displayed in the outlook calendar. Below is my code. <?php $ical4 = 'BEGIN:VCALENDAR PRODID:-//Microsoft Corporation//Outlook 10.0 MIMEDIR//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VEVENT DTSTART:20150310T183001Z DTEND:20150310T182959Z DTSTAMP:20150310T183000Z UID:2015-03-10_leave_24@gmail.com ORGANIZER:MAILTO

Outlook Add-in, RibbonType Microsoft.Outlook.Explorer and Microsoft.Outlook.Mail.Read

耗尽温柔 提交于 2020-01-23 01:18:07
问题 I have an Outlook 2010 Add-in coded in .NET 4.0/VS.NET 2010, C#. The Add-in extends the Ribbon => it adds a RibbonTab with 4 RibbonButtons to ( RibbonType Property is set to) Microsoft.Outlook.Explorer and Microsoft.Outlook.Mail.Read . Now, if the user clicks on one of the RibbonButtons, how can i determine if the user clicked on the button which is added to the Microsoft.Outlook.Explorer OR Microsoft.Outlook.Mail.Read ? 回答1: One option is to create (2) Ribbons with a shared capability