![]() |
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 send e-mails daily and provide specific information from an attached
spreadsheet from select cells within the same spreadsheet. I would like to write code that would concatenate the information together in an e-mail, automatically filling in the subject lines and sending. Here is what the process would be like: 1. I open the spreadsheet attachment. Check cell A1. 2. Close the spreadsheet attachment. 3. Forward the e-mail; the subject line remains the same. 4. The message is something like: "Your information is " & Cell A1 5. I would also need to format the information that was added using a number format. Any ideas? |
Ads |
#2
|
|||
|
|||
![]()
Am Thu, 27 Jul 2006 07:53:02 -0700 schrieb csergent:
Please add a ref to Excel to your Outlook VBA project (via Tools/References). Then you can see Excel's objects, methods etc. in the Object Browser (F2). From there you can also get easily help and examples. Now you're able to read the help for some keywords: 1. a) First you need to save the attachment as a file: SaveAsFile (method of the Attachment object) 1. b) Then you need to open that Workbook: Open function 1. c) The content is in the Workbook's Range("a1").Value 2. Close (method of the Workbook object) 3. Forward (function of the MailItem object that returns a new MailItem) 4. Write that info into the MailItem's Subject property 5. Use the Format function -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I send e-mails daily and provide specific information from an attached spreadsheet from select cells within the same spreadsheet. I would like to write code that would concatenate the information together in an e-mail, automatically filling in the subject lines and sending. Here is what the process would be like: 1. I open the spreadsheet attachment. Check cell A1. 2. Close the spreadsheet attachment. 3. Forward the e-mail; the subject line remains the same. 4. The message is something like: "Your information is " & Cell A1 5. I would also need to format the information that was added using a number format. Any ideas? |
#3
|
|||
|
|||
![]()
Michael,
Thanks I will try this out and post the outcome. Chris "Michael Bauer" wrote: Am Thu, 27 Jul 2006 07:53:02 -0700 schrieb csergent: Please add a ref to Excel to your Outlook VBA project (via Tools/References). Then you can see Excel's objects, methods etc. in the Object Browser (F2). From there you can also get easily help and examples. Now you're able to read the help for some keywords: 1. a) First you need to save the attachment as a file: SaveAsFile (method of the Attachment object) 1. b) Then you need to open that Workbook: Open function 1. c) The content is in the Workbook's Range("a1").Value 2. Close (method of the Workbook object) 3. Forward (function of the MailItem object that returns a new MailItem) 4. Write that info into the MailItem's Subject property 5. Use the Format function -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I send e-mails daily and provide specific information from an attached spreadsheet from select cells within the same spreadsheet. I would like to write code that would concatenate the information together in an e-mail, automatically filling in the subject lines and sending. Here is what the process would be like: 1. I open the spreadsheet attachment. Check cell A1. 2. Close the spreadsheet attachment. 3. Forward the e-mail; the subject line remains the same. 4. The message is something like: "Your information is " & Cell A1 5. I would also need to format the information that was added using a number format. Any ideas? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Selecting Addresses for a new mail message | flwmims | Outlook - General Queries | 2 | August 7th 06 04:53 PM |
How can I send a spreadsheet with email? | Dr.Jon | Outlook - Installation | 4 | June 29th 06 12:09 AM |
how can I download contact information to an excel spreadsheet | Larry H | Outlook - Using Contacts | 1 | March 17th 06 04:41 PM |
Mail recipient not getting information from newly designed form. | Alex Martinez | Outlook - Using Forms | 0 | March 14th 06 03:34 AM |
Accessing my Contacts information when creating new mail | Jeff | Outlook - General Queries | 2 | February 7th 06 04:21 PM |