![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I have messages sent to me from a company in a standard format.
The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
Ads |
#2
|
|||
|
|||
![]()
Only you can decide whether "the best way" means writing your own VBA code or
buying some off-the-shelf software. If you want to write your own code, these two pages should help you get started: http://www.outlookcode.com/article.aspx?id=62 http://www.outlookcode.com/codedetail.aspx?id=89 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "MEG" wrote: I have messages sent to me from a company in a standard format. The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
#3
|
|||
|
|||
![]() Do you mean, the data is written within the message text? You can extract that by using the functions Instr, Left, Right, and Mid. Every function is explained in the VBA help. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Tue, 15 Jul 2008 12:21:01 -0700 schrieb MEG: I have messages sent to me from a company in a standard format. The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
#4
|
|||
|
|||
![]()
Thank you for your reply.
Yes I want to extract data from the message text. I know how to use those functions. I'm just unsure how to get the text in the first place. MEG "Michael Bauer [MVP - Outlook]" wrote: Do you mean, the data is written within the message text? You can extract that by using the functions Instr, Left, Right, and Mid. Every function is explained in the VBA help. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Tue, 15 Jul 2008 12:21:01 -0700 schrieb MEG: I have messages sent to me from a company in a standard format. The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
#5
|
|||
|
|||
![]()
Sue:
Thank you for your reply. I placed your ConvertToPlain subroutine in the ThisOutlookSession. Then set a rule to run it using the RUN A SCRIPT on a rule. However, the code never runs. Messages come in, but the body text (which is HTML) stays that way. Thanks, MEG "Sue Mosher [MVP-Outlook]" wrote: Only you can decide whether "the best way" means writing your own VBA code or buying some off-the-shelf software. If you want to write your own code, these two pages should help you get started: http://www.outlookcode.com/article.aspx?id=62 http://www.outlookcode.com/codedetail.aspx?id=89 -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming: Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "MEG" wrote: I have messages sent to me from a company in a standard format. The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
#6
|
|||
|
|||
![]() That depends on some details. You could use the ItemAdd event of the Inbox. Please see the VBA help for an example for how to use the ItemAdd event. That event doesn't fire if your messages are received from an Exchange server while your Outlook isn't running. It also doesn't fire if more than 16 messages come in at the same time. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Tue, 15 Jul 2008 13:51:04 -0700 schrieb MEG: Thank you for your reply. Yes I want to extract data from the message text. I know how to use those functions. I'm just unsure how to get the text in the first place. MEG "Michael Bauer [MVP - Outlook]" wrote: Do you mean, the data is written within the message text? You can extract that by using the functions Instr, Left, Right, and Mid. Every function is explained in the VBA help. -- Best regards Michael Bauer - MVP Outlook : VBOffice Reporter for Data Analysis & Reporting : Outlook Categories? Category Manager Is Your Tool : http://www.vboffice.net/product.html?pub=6&lang=en Am Tue, 15 Jul 2008 12:21:01 -0700 schrieb MEG: I have messages sent to me from a company in a standard format. The message has fields and data from a form and therefore is in the same location each time. When a new message arrives, I'd like to read the message text and then extract certain data (i.e. email address, First Name, Last Name, etc). Using these fields, I'd like to send a response inserting the above extracted data into the message. What is the best way to do this? If macros are the way to go, is there sample code to do this? Thanks, MEG |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How do I call a VBA macro to process every incoming message? | rob | Outlook and VBA | 2 | February 28th 08 04:01 PM |
i cant see html on my incoming message (i see only plain text) | Salvatore LaFranca | Outlook - General Queries | 0 | January 23rd 08 08:52 PM |
VBA Script that copies incoming message to task | Murphybp2 | Outlook and VBA | 2 | January 3rd 08 10:46 PM |
Can't view pictures in incoming message | [email protected] | Outlook - General Queries | 2 | March 6th 07 04:38 AM |
Incoming message alert | mapman | Outlook - Installation | 0 | October 16th 06 06:22 PM |