Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sending email via VB - address length

Hi

I'm trying to send e-mails from Excel 97 via VB but am
having problems as the address text is truncated at 260
characters. The code I'm using is:

ActiveWorkbook.FollowHyperlink address:=addresses
whe addersses is defined as a variant type.

Does anybody know of a work around or is this just a limit
of the function? The mail client is Outlook 98.

Cheers
Carl Woodall
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Sending email via VB - address length

Carl

I don't have OL98, but in OL2000, it worked fine with 300 characters. Post
how you are using the FollowHyperlink method and I'll see if I can reproduce
it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Carl Woodall" wrote in message
...
Hi

I'm trying to send e-mails from Excel 97 via VB but am
having problems as the address text is truncated at 260
characters. The code I'm using is:

ActiveWorkbook.FollowHyperlink address:=addresses
whe addersses is defined as a variant type.

Does anybody know of a work around or is this just a limit
of the function? The mail client is Outlook 98.

Cheers
Carl Woodall



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Sending email via VB - address length

The code I'm using is:

Sub Send_Email()
Dim flag As Boolean

Dim count As Integer
Dim last_row As Integer
Dim length As Integer
Dim total_length As Long
Dim value As Integer

Dim row_height As Double

Dim addresses As Variant
Dim this_address As String

Dim h As Object
Dim endcell As Object
Dim startcell As Object

'
' Initialise Values
'
addresses = "mailto:"
count = 0
flag = False

'
' Count number of names
'
Cells(Row_num_start_of_name_list, 1).Activate
While Not (ActiveCell.value = "")
count = count + 1
ActiveCell.Offset(1, 0).Activate
Wend

Set startcell = Cells(Row_num_start_of_name_list, 1)
Set endcell = Cells(Row_num_start_of_name_list +
count - 1, 1)
Range(startcell, endcell).Select

For Each h In Selection.Hyperlinks
this_address = h.address
row_height = h.Parent.RowHeight
If (row_height 0) Then
length = Len(this_address)

value = length - 7
If (value < 0) Then
value = 0
End If

addresses = addresses + Right(this_address,
value) + "; "
flag = True
End If
Next

If flag Then
ActiveWorkbook.FollowHyperlink address:=addresses
End If
End Sub

Basically I'm picking up a list of hyperlinks I've defined
in a worksheet and which I can filter (Hence the code
checking the row height). I build up 'addresses' to
contain one large mailing list and then open the new e-
mail message using the FollowHyperlink method.

Hope it's not a limitation of OL98!

Cheers
Carl
-----Original Message-----
Carl

I don't have OL98, but in OL2000, it worked fine with 300

characters. Post
how you are using the FollowHyperlink method and I'll see

if I can reproduce
it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Carl Woodall"

wrote in message
...
Hi

I'm trying to send e-mails from Excel 97 via VB but am
having problems as the address text is truncated at 260
characters. The code I'm using is:

ActiveWorkbook.FollowHyperlink address:=addresses
whe addersses is defined as a variant type.

Does anybody know of a work around or is this just a

limit
of the function? The mail client is Outlook 98.

Cheers
Carl Woodall



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Sending email via VB - address length

Carl

I can do it up to about 448 characters at which point I get the message
"default mail client no properly installed"

I think you should try posting this to an outlook newsgroup. There's a
better chance that someone there is using or is familiar with O98.

If you can't get any satisfaction, you can try automating Outlook instead of
using a mailto hyperlink. If you go this route, you won't be able to use it
with any other mail program. See here

www.dicks-clicks.com

for information on automating Outlook. I'm sure you will be able to add as
many members to the Recipients collection as you like.

Whatever the result, be sure to let us know.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Carl Woodall" wrote in message
...
The code I'm using is:

Sub Send_Email()
Dim flag As Boolean

Dim count As Integer
Dim last_row As Integer
Dim length As Integer
Dim total_length As Long
Dim value As Integer

Dim row_height As Double

Dim addresses As Variant
Dim this_address As String

Dim h As Object
Dim endcell As Object
Dim startcell As Object

'
' Initialise Values
'
addresses = "mailto:"
count = 0
flag = False

'
' Count number of names
'
Cells(Row_num_start_of_name_list, 1).Activate
While Not (ActiveCell.value = "")
count = count + 1
ActiveCell.Offset(1, 0).Activate
Wend

Set startcell = Cells(Row_num_start_of_name_list, 1)
Set endcell = Cells(Row_num_start_of_name_list +
count - 1, 1)
Range(startcell, endcell).Select

For Each h In Selection.Hyperlinks
this_address = h.address
row_height = h.Parent.RowHeight
If (row_height 0) Then
length = Len(this_address)

value = length - 7
If (value < 0) Then
value = 0
End If

addresses = addresses + Right(this_address,
value) + "; "
flag = True
End If
Next

If flag Then
ActiveWorkbook.FollowHyperlink address:=addresses
End If
End Sub

Basically I'm picking up a list of hyperlinks I've defined
in a worksheet and which I can filter (Hence the code
checking the row height). I build up 'addresses' to
contain one large mailing list and then open the new e-
mail message using the FollowHyperlink method.

Hope it's not a limitation of OL98!

Cheers
Carl
-----Original Message-----
Carl

I don't have OL98, but in OL2000, it worked fine with 300

characters. Post
how you are using the FollowHyperlink method and I'll see

if I can reproduce
it.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Carl Woodall"

wrote in message
...
Hi

I'm trying to send e-mails from Excel 97 via VB but am
having problems as the address text is truncated at 260
characters. The code I'm using is:

ActiveWorkbook.FollowHyperlink address:=addresses
whe addersses is defined as a variant type.

Does anybody know of a work around or is this just a

limit
of the function? The mail client is Outlook 98.

Cheers
Carl Woodall



.



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
Sending a Spreadsheet as an Email Attachment vs. Imbedded in Email billbrandi Excel Discussion (Misc queries) 1 April 3rd 08 03:44 AM
send wkbk as an email attachment with an email address copied from SueInAtl Excel Discussion (Misc queries) 0 May 21st 07 10:53 PM
Sending Workbook to an email address. Panagiotis Atmatzidis Excel Discussion (Misc queries) 4 April 21st 07 12:22 AM
can I copy a column of email addresses, paste into email address? Lizizfree New Users to Excel 4 July 20th 06 10:03 PM
Transfer Email addresses from spreadsheet to email address book Beana Excel Discussion (Misc queries) 2 May 30th 06 06:07 PM


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

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

About Us

"It's about Microsoft Excel"