plot:
I am creating an approach 2007 add-in that is available for VSTO and C Using Visual Studio in #. The purpose of the add-in is the reason for tracking mail sent to customers. The add-in should include a tracking code in each outbound mail that later enables it to be recognized and automatically archived after the customer's answers. My goal is to have a tracking as an attribute in the opening tag of the mail's HTML Code is to be inserted:
& lt; Html tracking = "ddfwer4w5c45cgx345gtg4g" ... & gt; This will be done in the event handler of the application. ItemSend Event:
Private Zero This is AdDin_startup (Object Sender, System.EventArgs E) {This. Application Iememend + = New Microsoft.Office.Interop.Outlook.ApplicationEvents_11_ItemSendEventHandler (Application_ItemSend); } Zero Application_ItemSend (object items, riff hair cancel) {If (item is Outlook .mailItem) {Outlook.MailItem mail = (Outlook.MailItem) item; Mail.HTMLBody = "& lt; html tracking = \" 4w5te45yv5e6ye57j57jr6 \ "..."; }} Problem:
It seems that the HTMLBody property has never changed and it throws no exception. It just does nothing, I rewrite this argument directly into VBA in Outlook, and tried to change the HTMLBody, but it still has not changed. How do I know that HTMLBB has not been changed, moving forward and hovering through the property to see the current value.
I am able to make changes in MailItem.Body property though. But since I need to hide the tracking code in some way, since then physical property does not help me at all. I changed the HTMLBody property even after the MailItem.Save () method has been added, but there is no change.
I thought that the EventSend event is late and I can not convert HTMLBody at that time, but I can not get any event like this before or equally
any The ideas will be greatly appreciated.
I use a lot more than VB, but I think I'm seeing your problem Am
Check the function signature of Application_ItemSend I think the canceled reference has passed from context; Items should not be passed in such a way as well?
Zero Application_ItemSend (ref object items, cancel riff hair) {// ...} If the item is passed from the value, So your code only adds the copy that was made; The original thing is not being touched at least, thus working in C ++ (but my C ++ experience is the first one, so it may not be applicable).
Comments
Post a Comment