outlook-2010

formatting email body using VBA

不羁的心 提交于 2019-12-04 04:51:48
问题 I have the following section of code, which is part of an automatic reply system im developing. As i understand it, it should format the body of the email with line breaks, but, as the attached screenshot shows, it doesnt. Can somebody point oput where im going wrong? With NewForward .Subject = "'TEST' Hazard report reciept number: HAZ" & IDnumber .To = strSender .BCC = "xxxxxxxxxxxx" .HTMLBody = "Please accept this email as confirmation that xxxx has received your road defect notification.

How to add a button to a pre-existing tab on ribbon (C#)?

 ̄綄美尐妖づ 提交于 2019-12-04 01:46:47
I've successfully created a new tab and put it next to the pre-existing ones. Then I realized that I'll only have one button on it, so it makes more sense (for now) to put it on the Home tab. Didn't really get that to work though. I've tried to follow the guides and walk-troughs. I've got me an XML and changed its XML to the following. <tabs> <!--<tab idMso="TabAddIns">--> <tab idMso="TabHome"> <group id="group1" label="Hazaa!"> <box id="box1" /> </group> </tab> </tabs> When I run the project I get no changes to the UI, so I guess that either: the XML is not read at all, the name TabHome is

Removing EWS Appointment Body Text

有些话、适合烂在心里 提交于 2019-12-04 01:29:30
EWS creates appointment with a default "When" text in the body. Please see the image below: I am wondering if it is possible to remove or hide this text some how. Here is my code which create appointment using EWS Managed API ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP1, TimeZoneInfo.FindSystemTimeZoneById("Eastern Standard Time")); service.Credentials = new WebCredentials("ews_calendar", PASSWORD, "acme"); service.Url = new Uri("https://acme.com/EWS/Exchange.asmx"); Appointment newAppointment = new Appointment(service); newAppointment.Subject = "Test Subject"

How do I get MS Outlook to accept the CSS style display:block?

只谈情不闲聊 提交于 2019-12-03 22:25:29
I am composing an HTML email using a service (MailChimp). The way that MailChimp marks up headings is to use a SPAN tag and gives the tag the inline style of display:block . MS Outlook 2010 ignores this style. I cannot find any work around. Thus, headings wrap, breaking the desired page display. Yes, I know that Outlook uses MS Word to display HTML. Assume that I cannot intervene and hand edit the markup. How do I get MS Outlook to accept the CSS style display:block and display a SPAN tag as a block level element? The CSS display attribute is not supported in this version of MS Outlook. Here's

VBA code to delete emails after x Days

旧城冷巷雨未停 提交于 2019-12-03 14:04:44
问题 I am trying to delete all emails in my inbox that are older than 90 days. I am not able to use the auto archive since it has been disabled at my office. I have some code that does not seem to be deleting every mail that is older than 90 days. I think the issue might be with my loop. I am using Outlook 2010 with exchange 2010. Private Sub RemoveEmail90() Dim olSession As Outlook.Application, olNamespace As NameSpace Dim olInbox As Outlook.MAPIFolder Dim i As Integer Set olSession = New Outlook

VSTO Outlook addin need to save settings, best way?

ε祈祈猫儿з 提交于 2019-12-03 10:51:59
问题 I'm writing a VSTO Outlook add in and i need to save some settings the addin gets from a web service. What is the best way to do this. Registry? does the VSTO addin have full access to do something like that? Maybe a file containing the settings? Thanks in advance. 回答1: You can use a Settings (.settings) file. The advantage of this file, besides having a centralized and strongly-typed repository, is that you can make these settings either application -scoped or user -scoped. Application

VSTO Outlook addin need to save settings, best way?

孤街浪徒 提交于 2019-12-03 02:26:35
I'm writing a VSTO Outlook add in and i need to save some settings the addin gets from a web service. What is the best way to do this. Registry? does the VSTO addin have full access to do something like that? Maybe a file containing the settings? Thanks in advance. You can use a Settings (.settings) file. The advantage of this file, besides having a centralized and strongly-typed repository, is that you can make these settings either application -scoped or user -scoped. Application settings will be available to all users of the computer. User settings will be individualized for each user. (I

How to open Outlook's new mail window with prepopulated attachment

耗尽温柔 提交于 2019-12-03 02:14:21
I need to open a new email window with a prepopulated attachment when a user clicks some button or link in my application. Pieterjan Spoelders Old question, but I also ran in to this so here's a copy and paste solution: Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); oMsg.Subject = "subject something"; oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat

VBscript outlook form creating meeting in specific calendar

血红的双手。 提交于 2019-12-02 15:57:43
问题 I've been working on this the past few days. My VBscript code works and will create a meeting in the default calendar in Outlook. The part I can't seem to figure out is how to have the meeting made in a custom calendar named "Test". This calendar is listed under "My Calendars". Any advice? Sub commandbutton1_Click() If CommandButton1 = False Then Const olFolderCalendar = 9 Const olAppointmentItem = 1 Const olOutOfOffice = 3 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace

SentOnBehalfOf not working in Excel 2010 VBA Code

╄→гoц情女王★ 提交于 2019-12-02 11:12:29
问题 I am working on a VBA script for mailing through Outlook in Excel 2010. Everything runs fine with one exception: the .SentOnBehalfofName line will not work. Here is the complete code Sub Mail() ' Working in Office 2010-2013 Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dim strbody As String ' This is for the Body of the email Dim signature As String ' This is for the email signature On Error Resume Next 'Set OutMail = Nothing 'Set OutApp = Nothing Dim sh As Worksheet Set