outlook-2007

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

两盒软妹~` 提交于 2019-11-28 07:36:21
问题 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

Background images not working in Outlook 2007 and later

元气小坏坏 提交于 2019-11-28 05:30:27
I made an HTML Email Template that is working fine in most email readers, but the background images are not showing in Outlook 2007, 2010, and 2013. How can I solve the problem? Here's the HTML for the email: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css"> * { padding: 0px; margin: 0px; border: 0px; outline: 0px; } .ExternalClass {width:100%;} .ExternalClass, .ExternalClass p,

Regular Expression Rules in Outlook 2007?

ぐ巨炮叔叔 提交于 2019-11-28 03:54:51
Is it possible to create rules in Outlook 2007 based on a regex string? I'm trying to add a filter for messages containing a string such as: 4000-10 , a four digit number followed by a dash and then a two digit number, which can be anything from 0000-00 to 9999-99 . I was using this as a regex: \b[0-9]{4}\-[0-9]{2}\b but the filter isn't working. I've tried a few other modifications as well with no luck. I wasn't able to find anything concrete online about whether Outlook even supports entering regexes into a rule, though, so I figured I would ask here in case I'm wasting my time. EDIT: Thanks

Call outlook VBA from Excel

一个人想着一个人 提交于 2019-11-28 00:30:59
I have a function in the outlook VBA that I want to call when a certain excel workbook is closed. Is there a way to do this with the BeforeClose event of excel? I know how to write functions for this event, but I am not sure how to link them to the current outlook session to get to the function. If you wish to get hold of a reference to an instance of Outlook that is already running, you will need to use: Set myOutlookApp = GetObject(,"Outlook.Application") which will give you access to the Outlook application object so you can call your desired VBA function in Outlook: myOutlookApp

Outlook 2007 from C# - COM exception, TYPE_E_LIBNOTREGISTERED

江枫思渺然 提交于 2019-11-28 00:03:02
I'm trying to make a program that would open new Outlook 2007 message. I've referenced from COM tab Microsoft Outlook 12.0 ObjectLibrary. These items showed up in references in VS: Microsoft.Office.Core Microsoft.Office.Inerop.Outlook Now I try to invoke following code: var _outlookInstance = new Microsoft.Office.Interop.Outlook.Application(); var _message = (OutlookApp.MailItem)_outlookInstance.CreateItem(OutlookApp.OlItemType.olMailItem); where OutlookApp==Microsoft.Office.Interop.Outlook namespace. While invoking second line of listing I keep getting this exception: (InvalidCastException)

Update an event in Outlook 2007 with an iCalendar file

谁都会走 提交于 2019-11-27 17:48:21
问题 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

VBScript to send email without running Outlook

妖精的绣舞 提交于 2019-11-27 14:03:52
I have written an automated test that runs each night, and I would like to email the results each night once the test is finished. In order to do this I attempted to put the following at the end of my batchfile: Set MyApp = CreateObject("Outlook.Application") Set MyItem = MyApp.CreateItem(0) With MyItem .To = "a@a.com" .Subject = "Subject" .ReadReceiptRequested = False .HTMLBody = "resport" End With MyItem.Send However, this is causing the email to not send because my Outlook is not open, as the test is run in the background, and I have no access to the UI. Is there anyway to send this email

Rich HTML emails in Outlook 2007 and 2010… how do you remove the top margin?

旧时模样 提交于 2019-11-27 13:14:22
问题 I have a rich HTML email. I was wondering how, in Outlook 2010 and 2007, you get the table in the layout to sit flush with the edge of the browser? Have a look at this pic: The pink is the background color of the body tag and the grey is the bg of the table. They both have 0 everything (margin, paddting ect). But there is still some space. The pink should not be visible. Does anyone know how to get rid of this space on the body? Also here’s some CSS for the start of the email: <html> <head>

In outlook html email, float does not work

假装没事ソ 提交于 2019-11-27 07:25:29
I want this layout where I have a rectangular box. And inside the box on the left there is a text and on the right there is an image. This looks fine in the browser, but when sent out as an html email, in outlook the float right doesn't seem to work. It puts the image in the next line under the text. Any ideas on how to make this work? (I am trying to avoid using tables.) <div style="width: 100%;border-style:solid;overflow: hidden;"> <span style="float: left;"> <h3> Your appointment Details</h3> </span> <span style="float: right;"> <img src="someImage"/> </span> </div> Marc Audet When it comes

Sending Outlook Email with embedded image using VBS

喜欢而已 提交于 2019-11-27 07:08: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