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

Selecting Spreadsheet Cell Information for e-mail



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 27th 06, 03:53 PM posted to microsoft.public.outlook.program_vba
csergent
external usenet poster
 
Posts: 5
Default Selecting Spreadsheet Cell Information for e-mail

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  
Old July 28th 06, 06:22 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default Selecting Spreadsheet Cell Information for e-mail

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  
Old July 28th 06, 03:30 PM posted to microsoft.public.outlook.program_vba
csergent
external usenet poster
 
Posts: 5
Default Selecting Spreadsheet Cell Information for e-mail

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
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
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


All times are GMT +1. The time now is 05:14 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.