F
Finalstryke
Hi,
I'm a bit new at scripting and stuff, but I'd really appreciate some
pointers on how to do a custom message rule.
All I want to do is check for the conditions, and if they're met then run a
script that simply saves the whole message as a .txt file at a location
given by a designated file path.
The nearest I could find in the help file was something like:
----------------------------------------------------------------------------
---------
Sub CustomMailMessageRule(Item As Outlook.MailItem)
Dim myItem As Inspector
Dim objItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
strname = objItem.Subject
objItem.SaveAs "C:\...." & " & strname & .txt", olTXT
Else
MsgBox "There is no current active Inspector."
End If
End Sub
----------------------------------------------------------------------------
-------------------------
but even after adding in the correct filepath all I could get was the msgbox
popping up at me and telling me there was no current active inspector
help... I don't even know what an inspector is!
Thanks,
Owen
I'm a bit new at scripting and stuff, but I'd really appreciate some
pointers on how to do a custom message rule.
All I want to do is check for the conditions, and if they're met then run a
script that simply saves the whole message as a .txt file at a location
given by a designated file path.
The nearest I could find in the help file was something like:
----------------------------------------------------------------------------
---------
Sub CustomMailMessageRule(Item As Outlook.MailItem)
Dim myItem As Inspector
Dim objItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.ActiveInspector
If Not TypeName(myItem) = "Nothing" Then
Set objItem = myItem.CurrentItem
strname = objItem.Subject
objItem.SaveAs "C:\...." & " & strname & .txt", olTXT
Else
MsgBox "There is no current active Inspector."
End If
End Sub
----------------------------------------------------------------------------
-------------------------
but even after adding in the correct filepath all I could get was the msgbox
popping up at me and telling me there was no current active inspector
help... I don't even know what an inspector is!
Thanks,
Owen