Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / July 2005

Tip: Looking for answers? Try searching our database.

run a rule to create a file

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mark - 26 Jul 2005 21:43 GMT
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
Michael Bauer - 31 Jul 2005 16:29 GMT
Am Tue, 26 Jul 2005 16:43:56 -0400 schrieb mark:

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

Signature

Viele Gruesse / Best regards
Michael Bauer - MVP Outlook

> 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
[quoted text clipped - 20 lines]
> operation
> and in this case I cannot acces the file as it remains in use by Outlook
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.