run a rule to create a file

  • Thread starter Thread starter mark
  • Start date Start date
M

mark

I would like to run the rule which upon receiving a specific email would
create a text file and close the script to allow for further operation on
the file.

I thought that something like below in script would work

Sub CustomMailMessageRule(Item As Outlook.MailItem)
Open "c:\emailtest\test.txt" For Random As #1
Close file
End Sub

no :-(...any hints would be appreciated


If I do this

Sub CustomMailMessageRule(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
Open "c:\emailtest\test.txt" For Random As #1
Close file
End Sub

it displays the message box , it creates the file, however I need silent
operation
and in this case I cannot acces the file as it remains in use by Outlook
 
Am Tue, 26 Jul 2005 16:43:56 -0400 schrieb mark:


Mark, what doesn´t work? Isn´t the file being created?
 
Back
Top