N
Nigel
I have a .NET addin which picks up the Item_Send event of a mail item. I then attempt to add a 'BCC' address to the mail item as well as edit the body of the email. When doing both of these items I get an error 'The operation failed'. If I only add the BCC address it works fine OR if I only edit the body of the email it works fine, but it errors if I attempt to do both
I need to be able to edit the body of the email and then copy it to a public folder. I don't care if I get a CC of the email or the sent folder version. Anything copy of the email will work
Here is my code
Private Sub applicationObject_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean) Handles m_olOutlook.ItemSen
Try
Item.Body = Item.Body & vbCrLf & vbCrLf & vbCrLf & "Profile: 100
Item.BCC = "(e-mail address removed)" 'this is a valid mailbo
Catch ex As Exceptio
ErrorDialog(ex.Message
End Tr
End Su
I have also tried getting rid of the BCC and instead changing the sent folder of the message, but this too fails...below is my code snippet of that
Dim oFolder As Outlook.MAPIFolde
oFolder = m_olOutlook.GetNamespace("MAPI").Folders.Item("Public Folders").Folders.Item("All Public Folders").Folders.Item("Profiled Emails")
m_olMailItem.SaveSentMessageFolder = oFolde
Any help would be greatly appreciated
I need to be able to edit the body of the email and then copy it to a public folder. I don't care if I get a CC of the email or the sent folder version. Anything copy of the email will work
Here is my code
Private Sub applicationObject_ItemSend(ByVal Item As Object, ByRef Cancel As Boolean) Handles m_olOutlook.ItemSen
Try
Item.Body = Item.Body & vbCrLf & vbCrLf & vbCrLf & "Profile: 100
Item.BCC = "(e-mail address removed)" 'this is a valid mailbo
Catch ex As Exceptio
ErrorDialog(ex.Message
End Tr
End Su
I have also tried getting rid of the BCC and instead changing the sent folder of the message, but this too fails...below is my code snippet of that
Dim oFolder As Outlook.MAPIFolde
oFolder = m_olOutlook.GetNamespace("MAPI").Folders.Item("Public Folders").Folders.Item("All Public Folders").Folders.Item("Profiled Emails")
m_olMailItem.SaveSentMessageFolder = oFolde
Any help would be greatly appreciated