Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Email Generation

Hello

I am trying to pull together an email from within Excel and can do so
successfully. I gather various pieces of data from various worksheets,
collate them and add them to the email.

However I am coming across a slight problem. Data such as email address etc.
is no problem. When trying to create the main body of the email I pull data
from the worksheets and place it within a variable.

The problem is that at some point the data I pull into the variable must
become too large.

The code is something like:

loop for each valid cell
msg = msg & cell value & crlf
next loop

Once all the data is collected, I replace all spaces with %20, then replace
all carriage returns with %0D%0A.
I believe that msg (variant) is too full. I say this because my routine
works OK if I pull together 43 sets of data, but fails with 44 and above.

I copied the data to a cell on my worksheet and did len(cell). With 43 =
1925, with 44 = 1947.

Is there a limit to the data length for a variant (or string) variable? Is
there a limit on the amount of data on an email.

Any help would be appreciated.

Regards
MiNK

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Generation

Hi MiNK

Which mail program do you use ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"MiNK" wrote in message ...
Hello

I am trying to pull together an email from within Excel and can do so
successfully. I gather various pieces of data from various worksheets,
collate them and add them to the email.

However I am coming across a slight problem. Data such as email address etc.
is no problem. When trying to create the main body of the email I pull data
from the worksheets and place it within a variable.

The problem is that at some point the data I pull into the variable must
become too large.

The code is something like:

loop for each valid cell
msg = msg & cell value & crlf
next loop

Once all the data is collected, I replace all spaces with %20, then replace
all carriage returns with %0D%0A.
I believe that msg (variant) is too full. I say this because my routine
works OK if I pull together 43 sets of data, but fails with 44 and above.

I copied the data to a cell on my worksheet and did len(cell). With 43 =
1925, with 44 = 1947.

Is there a limit to the data length for a variant (or string) variable? Is
there a limit on the amount of data on an email.

Any help would be appreciated.

Regards
MiNK

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Email Generation

Hi Ron

We're using Outlook.
In fact I need to use 2 different approaches to the emails. One for just the
email, the other if there's an attachment. I'm looking at this at the moment
to see if I can use just one email routine. Any suggestions?

Cheers

MiNK

"Ron de Bruin" wrote in message
...
Hi MiNK

Which mail program do you use ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"MiNK" wrote in message
...
Hello

I am trying to pull together an email from within Excel and can do so
successfully. I gather various pieces of data from various worksheets,
collate them and add them to the email.

However I am coming across a slight problem. Data such as email address
etc. is no problem. When trying to create the main body of the email I
pull data from the worksheets and place it within a variable.

The problem is that at some point the data I pull into the variable must
become too large.

The code is something like:

loop for each valid cell
msg = msg & cell value & crlf
next loop

Once all the data is collected, I replace all spaces with %20, then
replace all carriage returns with %0D%0A.
I believe that msg (variant) is too full. I say this because my routine
works OK if I pull together 43 sets of data, but fails with 44 and above.

I copied the data to a cell on my worksheet and did len(cell). With 43 =
1925, with 44 = 1947.

Is there a limit to the data length for a variant (or string) variable?
Is there a limit on the amount of data on an email.

Any help would be appreciated.

Regards
MiNK


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Email Generation

You can use other code then

See the Outlook object model (body) section
http://www.rondebruin.nl/sendmail.htm




--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"MiNK" wrote in message ...
Hi Ron

We're using Outlook.
In fact I need to use 2 different approaches to the emails. One for just the
email, the other if there's an attachment. I'm looking at this at the moment
to see if I can use just one email routine. Any suggestions?

Cheers

MiNK

"Ron de Bruin" wrote in message
...
Hi MiNK

Which mail program do you use ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"MiNK" wrote in message
...
Hello

I am trying to pull together an email from within Excel and can do so
successfully. I gather various pieces of data from various worksheets,
collate them and add them to the email.

However I am coming across a slight problem. Data such as email address
etc. is no problem. When trying to create the main body of the email I
pull data from the worksheets and place it within a variable.

The problem is that at some point the data I pull into the variable must
become too large.

The code is something like:

loop for each valid cell
msg = msg & cell value & crlf
next loop

Once all the data is collected, I replace all spaces with %20, then
replace all carriage returns with %0D%0A.
I believe that msg (variant) is too full. I say this because my routine
works OK if I pull together 43 sets of data, but fails with 44 and above.

I copied the data to a cell on my worksheet and did len(cell). With 43 =
1925, with 44 = 1947.

Is there a limit to the data length for a variant (or string) variable?
Is there a limit on the amount of data on an email.

Any help would be appreciated.

Regards
MiNK


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Key Generation Sri Excel Discussion (Misc queries) 1 March 9th 07 03:53 PM
Random generation. Joergen Bondesen Excel Programming 3 January 28th 07 03:26 PM
email generation Mir Khan Excel Discussion (Misc queries) 1 September 23rd 05 09:10 PM
Row ID generation Mikus Excel Programming 2 September 3rd 05 05:39 PM
Report Generation Alan[_18_] Excel Programming 1 November 19th 03 01:46 AM


All times are GMT +1. The time now is 02:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"