outlook-2007

Outlook 2007 vsto add-in. Get email sender address

这一生的挚爱 提交于 2019-11-30 18:43:12
I have a VSTO Outlook 2007 add-in. I am trying to get sender e-mail address when new email comes to Inbox. To do it I use the following code: void inboxItems_ItemAdd(object Item) { Outlook.MailItem mailItem = Item as Outlook.MailItem; if (mailItem != null) string emailAdress = mailItem.SenderEmailAddress; } The problem is when e-mail comes from the same domain, emailAdress contains LDAP address like /O=FIRST ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN=ADMINISTRATOR while I want to get SMTP address like administrator@orgname.com My question is how to get SMTP sender address of e

How to set a custom Icon of an Outlook folder?

穿精又带淫゛_ 提交于 2019-11-30 04:43:49
问题 Is there any way to set a custom Icon of an Outlook folder or subfolder using Outlook object model? 回答1: As from Outlook 2010 you can use MAPIFolder.SetCUstomIcon as described above. I have had the same challenge recently and found a nice snippet of VBA code at Change Outlook folders colors possible?: joelandre Jan 12, 2015 at 9:13 PM Unzip the file icons.zip to C:\icons Define the code below as Visual Basic Macros Adapt the function ColorizeOutlookFolders according to your needs Text

How do you get a reference to the mail item in the current open window in Outlook using VBA?

会有一股神秘感。 提交于 2019-11-29 13:44:07
I have a macro that works very well to place into folders / apply flags / set categories, but it only works on the current item selected in the explorer. When I get an email alert on my desktop and click on it to open the email message, I would like to be able to run the same macro against that open item, but I can't find any documentation on how to access that object in a similar way to how I access the selected item in the explorer list. My current selection logic looks like this: Dim Item As Object Dim SelectedItems As Selection Set SelectedItems = Outlook.ActiveExplorer.Selection For Each

Update an event in Outlook 2007 with an iCalendar file

柔情痞子 提交于 2019-11-29 03:45:44
There is a previous thread with this question , and hints at an answer, but I could not get it to work. I have an ICS file. It validates . It looks like this: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//WA//FRWEB//EN BEGIN:VEVENT UID:FRICAL201 SEQUENCE:0 DTSTAMP:20081108T151809Z DTSTART:20081109T121200 SUMMARY:11/9/2008 12:12:00 PM TRIP FROM JFK AIRPORT (JFK) LOCATION:JFK AIRPORT (JFK) END:VEVENT END:VCALENDAR I double-click it and it goes into Outlook 2007 perfectly. Then, I double-click another ICS file that looks like this: BEGIN:VCALENDAR VERSION:2.0 PRODID:-//WA//FRWEB//EN BEGIN:VEVENT METHOD

Outlook 2007 / 2013 not rendering CSS font-family declarations

房东的猫 提交于 2019-11-29 01:13:50
问题 I'm testing an email design with Litmus and for the life of me I cannot get my fonts to be properly set in Outlook 2007 / 2010 / 2013. Every single HTML / CSS trick / hack continues to render in Times New Roman: ` I'm mostly using simple tables for layout, so all content is ultimately inside a TD element. Here are the various techniques I've tried to set the font. My STYLE declaration: Have tried this in both the HEAD and BODY tags & neither works. <style> @font-face { font-family: proxima

Sending Outlook Email with embedded image using VBS

强颜欢笑 提交于 2019-11-28 12:37:26
I am currently using the following VBS script to send an email and it works fine, however the image is sent as an attachment. I would instead like to embed the image into the email. I understand that I must reference the attachment in the HTML body of the email but I am struggling to do this. Any suggestions? Dim ToAddress Dim FromAddress Dim MessageSubject Dim MyTime Dim MessageBody Dim MessageAttachment Dim ol, ns, newMail MyTime = Now ToAddress = "email@address.com" MessageSubject = "Auto Stats " & MyTime MessageBody = "Stats Attached" & vbCrLf & "Produced at " & MyTime MessageAttachment =

Access Outlook default folder

旧城冷巷雨未停 提交于 2019-11-28 11:33:30
I working on an Outlook VBA application and I need to access my inbox but I seem to be having some trouble. I am using the GetDefaultFoldder(olFolderInbox) method, however, I have several email addresses set up and none of them show up in my personal folder's inbox. So my question is, where is this default folder defined? How do I know which inbox is the default one? I know there is also the GetFolderFromID method, if I were to use this, how can I find a folders ID in order to point to it? Here is the code I am using. This is from a tutorial on Timothy Chen Allen's blog as seen here Timothy's

Div styles not working in Outlook Emails

痞子三分冷 提交于 2019-11-28 10:06:44
I have created a HTML template for Emails using Div tags. Its working fine on Gmail, Yahoo. But Div styles not working in the Outlook. Following is the code which i have used. <div style="margin:auto;padding:auto;background-color:#FFFFFF;width:600px;border:0px;"> Testing Email </div> I have set div width 600px also make margin and padding auto. so that it will display in the center of the screen. But its not working like that. Gmail, Yahoo display email in the center of the screen Please suggest how can i reslove this issue. Float width and position CSS styles applied to div's do not work in

background image on TD in Outlook 2007

一笑奈何 提交于 2019-11-28 09:32:56
I've been told using tables is the best way to send emails although it's been twice as difficult. I have setup the email in tables, set all of the cells which need backgrounds with the background="" property, as well as using CSS in <style> tags saying the same thing to cover my bases. The body background shows fine in outlook, but the TD backgrounds do not. I've tried also using but that doesn't work either. I've read that Outlook 2007 doesn't support background images and won't in the future, I'm thinking there has to be a way around it? Checkout this link for supported HTML and CSS tags in

VSTO Outlook Embed Image MailItem

感情迁移 提交于 2019-11-28 08:49:43
I need to embed an image as a part of the email, after the User Signature, not at the end of the email, becasue if i'm sending a reply of a large email, the embedded Image it's going to be at the bottom of the emails chain How do I embed an image as part of the email content (Not a link to an outside image)? How do I add this image after the user Signature? I'm work with VSTO, VS2008 Fwk3.5 and Outlook 2007 Here is my code: public partial class ThisAddIn { private void ThisAddIn_Startup(object sender, System.EventArgs e) { this.Application.ItemSend += new Microsoft.Office.Interop.Outlook