Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Starting VB6 app on msg arrival

Status
Not open for further replies.

elquixiote

Technical User
Joined
Nov 30, 2002
Messages
99
Location
MX
Hi!. I'm facing to the following problem:
I already know how to start an application when a incoming
message is arriving (using ms-outlook rules). The problem is
how to pass the data contained in the message to the application for processing ....

I hope someone could help me ...

Thanks...

El Quijote ...

 
Pass it as a parameter when opening,
shell ("My.exe " & TheMessage)
then in the form load or sub main do something like:

msgbox "The message is: " & Command

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Hi Dr JavaJoe!. Thanks for paying attention to my request. I think wasn´t clear enough about my problem.

I know how to start an application using the outlook rules but the configuration dialog provided to do so does not allow parameter definition, you joust define the path where the application is located and thats all.

MS outlook does not provide (at least I don´t know) procedures to handle the message as an object so you can save it as text file, besides I don´t know where to code the instruction 'shell("My.exe" & theMessage)'. I know the intention of that instruction and the use of the command function but I don´t get how to accomplish my task using these coding.

Maybe the problem is clearer, I hope so.

Thanks, again ...

El Quijote
 
Maybe try having your program look for the most recent message in the inbox when it opens. You can browse the inbox using the Outlook Application object. If it is a specific type of message that you want to start the program, you could even have Outlook move the message to a specific folder as part of your rule, then have the program browse only that folder for the most recent message. Once your program has found the message, you can do pretty much anything you want with it. Read in the contents, forward it, etc. The only drawback would be if a message came in between the time that your program is told to open and the time that your program checks for the most recent message. Although that would not be especially likely, it is something to think about.

Hope that helps!
 
I'm not real familiar with using the Outlook rules but just browsing it my first thought would be to create a multipart rule. First move the message to a particular folder then execute the VB app that processes all messages in that folder, then the VB app moves the messages to another folder.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Ok. Both could be a solution.
I'll work on that.

Thanks for your hints..

El Quijote
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top