fiogf49gjkf0d Hello all:
Sage Saleslogix Version 7.5.1.1742
I write VB Code in Outlook2010 mail content is Save as XX.Slm File However, this file does not automatically imported into the History table ?
Ootlook VB Code:
Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
Dim myItem As Outlook.MailItem Set myItem = Application.CreateItem(olMailItem) If myItem.Class = olMail Then
Dim myItem As Outlook.Inspector Dim objItem As Outlook.MailItem Dim strPrompt As String, strname As String Dim sreplace As String, mychar As Variant, strdate As String Set myItem = Outlook.ActiveInspector Set objItem = myItem.CurrentItem If objItem.Class = olMail Then If objItem.Subject <> vbNullString Then strname = objItem.Subject Else strname = "No_Subject" End If strdate = objItem.ReceivedTime sreplace = "_" For Each mychar In Array("/", "\", ":", "?", Chr(34), "<", ">", "|") strname = Replace(strname, mychar, sreplace) strdate = Replace(strdate, mychar, sreplace) Next mychar myPath = "C:\Documents and Settings\USER\Application Data\Saleslogix\Outlook\TempMailDir" objItem.SaveAs myPath & "\" & "S-" & Format(Now, "YYYYMMDD-hhmmss") & ".SLM", olMSG End If
End If
End Sub |