A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro to foward just a specific part of an email body of message



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 20th 06, 02:23 AM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default Macro to foward just a specific part of an email body of message

Hello - I am resonably versed in VBA but mostly for Access and Excel -
I am just starting to dabble in Outlook macros to automate stuff for
users.

Here's the latest I am trying to get done (and obviously would love
code suggestions for...)

1. Email comes in for order information

Example follows:
==================================================
Store ID: westwayeshop
Date order placed: Tue Apr 04 15:05:18 2006
Order Number: 1438

ShopSite Transaction ID: 10172-1144177444



Billing Address:
-----------------
Customer Name: mr mark Gordon
Company:
Address: 1232 S. Ervay St.
City: Dallas
State/Province: TX
Zip Code: 75215
Country: United States
Phone Number: 800-348-3888
Email:

The shipping address is the same as the above address

Comments / More Information

Special Ordering Instructions (if any)




Qty Name W_Num Each Subtotal
------------------------------------------------------------------------
200 83R BRK BATTRY SMK DET W000377 $9.31
$1,862.00
------------------------------------------------------------------------
Subtotal
$1,862.00
Shipping: UPS Ground
$100.00
Tax Total
$0.00
Grand Total
$1,962.00

Payment type: Visa


Order Processing Info:
*ANET-SALE*:1066828242:055182,N,,This transaction has been approved.:

To retrieve payment information on this order, click on the 'Orders'
button from within ShopSite.
Shopsite URL:
https://commerce29.pair.com/ontops/c...s/ss/start.cgi

This store is powered by ShopSite web catalog software.

================================================== =
End of Sample

2. Now - what I want to do is strip out only the billing address and
order items
Like this
================================================== ===
Billing Address:
-----------------
Customer Name: mr mark Gordon
Company:
Address: 1232 S. Ervay St.
City: Dallas
State/Province: TX
Zip Code: 75215
Country: United States
Phone Number: 800-348-3888
Email:

The shipping address is the same as the above address

Comments / More Information

Special Ordering Instructions (if any)




Qty Name W_Num
------------------------------------------------------------------------
200 83R BRK BATTRY SMK DET W000377
================================================== ====

3. Now - I want to add some of my own text above and or below this text

4. Write something in the Subject Line - Like "Purchase Order
request...."

5. Pop open the Address book and default to addresses starting with
"Supplier - *"

6. After send then move to folder (this I may get done with a rule)...

NOTES -
- There may be multiple lines of products listing in the original
email
- The email comes formatted as plain text

Any help with this or even parts of this would be greatly appreciated.

Thanks.

John Kolker

Ads
  #2  
Old August 20th 06, 07:21 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Macro to foward just a specific part of an email body of message

Am 19 Aug 2006 18:23:42 -0700 schrieb :

John, the e-mail´s Body property contains that string.

With the InStr function you can find e.g. the start of "Billing Address" or
"Customer Name:". You then need to find the line´s end, which are usually
the vbCRLF characters. Given both the positions you can user the Mid
function to get that part of the string.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.VBOffice.net --


Hello - I am resonably versed in VBA but mostly for Access and Excel -
I am just starting to dabble in Outlook macros to automate stuff for
users.

Here's the latest I am trying to get done (and obviously would love
code suggestions for...)

1. Email comes in for order information

Example follows:
==================================================
Store ID: westwayeshop
Date order placed: Tue Apr 04 15:05:18 2006
Order Number: 1438

ShopSite Transaction ID: 10172-1144177444



Billing Address:
-----------------
Customer Name: mr mark Gordon
Company:
Address: 1232 S. Ervay St.
City: Dallas
State/Province: TX
Zip Code: 75215
Country: United States
Phone Number: 800-348-3888
Email:

The shipping address is the same as the above address

Comments / More Information

Special Ordering Instructions (if any)




Qty Name W_Num Each Subtotal
------------------------------------------------------------------------
200 83R BRK BATTRY SMK DET W000377 $9.31
$1,862.00
------------------------------------------------------------------------
Subtotal
$1,862.00
Shipping: UPS Ground
$100.00
Tax Total
$0.00
Grand Total
$1,962.00

Payment type: Visa


Order Processing Info:
*ANET-SALE*:1066828242:055182,N,,This transaction has been approved.:

To retrieve payment information on this order, click on the 'Orders'
button from within ShopSite.
Shopsite URL:

https://commerce29.pair.com/ontops/c...s/ss/start.cgi

This store is powered by ShopSite web catalog software.

================================================== =
End of Sample

2. Now - what I want to do is strip out only the billing address and
order items
Like this
================================================== ===
Billing Address:
-----------------
Customer Name: mr mark Gordon
Company:
Address: 1232 S. Ervay St.
City: Dallas
State/Province: TX
Zip Code: 75215
Country: United States
Phone Number: 800-348-3888
Email:

The shipping address is the same as the above address

Comments / More Information

Special Ordering Instructions (if any)




Qty Name W_Num
------------------------------------------------------------------------
200 83R BRK BATTRY SMK DET W000377
================================================== ====

3. Now - I want to add some of my own text above and or below this text

4. Write something in the Subject Line - Like "Purchase Order
request...."

5. Pop open the Address book and default to addresses starting with
"Supplier - *"

6. After send then move to folder (this I may get done with a rule)...

NOTES -
- There may be multiple lines of products listing in the original
email
- The email comes formatted as plain text

Any help with this or even parts of this would be greatly appreciated.

Thanks.

John Kolker

  #3  
Old August 20th 06, 10:50 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default Macro to foward just a specific part of an email body of message

Thank you Michael - can you look at the rest of the problem (the call
or popup of the address book)... any code snippets to help me get
started? I just need a little nudge on this one...

Thanks.

John Kolker

  #4  
Old August 21st 06, 05:34 AM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Macro to foward just a specific part of an email body of message

Am 20 Aug 2006 14:50:10 -0700 schrieb :

You´ll find samples for the mentioned functions in the VBA help.

3. Adding text above:

Body = "text" & vbCRLF & Body

or below:

Body = Body & vbCRLF & "text"

4. Write into the item´s Subject property.

5. You can´t default any addresses in the Address Book. You can use
Comandbar techniques (
http://www.outlookcode.com/d/tips/commandbarfun.htm)
to open it. The button´s ID is 353.

6. You can set the SaveSentMessageFolder property.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.VBOffice.net --


Thank you Michael - can you look at the rest of the problem (the call
or popup of the address book)... any code snippets to help me get
started? I just need a little nudge on this one...

Thanks.

John Kolker

  #5  
Old August 21st 06, 03:01 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 6
Default Macro to foward just a specific part of an email body of message

Again Michael thank you - what about a sample for extracting or parsing
text within the body of the email?

Have a great day.

JK

  #6  
Old August 21st 06, 05:41 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default Macro to foward just a specific part of an email body of message

Am 21 Aug 2006 07:01:20 -0700 schrieb :

What is wrong with the samples from the VBA help?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.VBOffice.net --


Again Michael thank you - what about a sample for extracting or parsing
text within the body of the email?

Have a great day.

JK

  #7  
Old August 21st 06, 09:07 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Macro to foward just a specific part of an email body of message

Or this one: http://www.outlookcode.com/codedetail.aspx?id=89

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Michael Bauer [MVP - Outlook]" wrote in message ...
Am 21 Aug 2006 07:01:20 -0700 schrieb :

What is wrong with the samples from the VBA help?

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.VBOffice.net --


Again Michael thank you - what about a sample for extracting or parsing
text within the body of the email?

Have a great day.

JK

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email font size in body changes randomly after the message is sent [email protected] Outlook - General Queries 0 May 31st 06 10:52 PM
Help: Send To Email Message in Body TJ Outlook Express 3 May 4th 06 01:23 PM
Attachment does not show on header but in message body when create new email Johnny Chow Outlook - General Queries 2 January 30th 06 10:47 PM
How to filter email with blank subject, to, and message body ken4az Outlook - Installation 0 January 20th 06 05:27 PM
I want to send a new message to a user when a specific email arriv Michael Bauer Outlook and VBA 1 January 9th 06 03:02 PM


All times are GMT +1. The time now is 02:08 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.