Character limits in mailto strings in Access 2003

AlienRay

Registered User.
Local time
Today, 10:27
Joined
Oct 8, 2003
Messages
47
I've just come across a peculiar 2000 vs. 2003 problem.

I have a form that generates an email via VBA code. The body text of this email varies depending upon the contents of the data tables. The technique I have been using is to establish a mailto: line, and treat it as a hyperlink. The code therefore works like this:

Dim myMessage as String
myMessage = "mailto:" & myAddressList & "&subject=" & mySubjectLine & "&body=" & myBodyText
Application.FollowHyperlink myMessage

In Access 2000, this works fine. However, in Access 2003, the code fails at the last line whenever myBodyText exceeds somewhere around 450 characters. This is true even if I divide the text in myBodyText into several sections. In other words, if the message text exceeds 450 characters, the hyperlink won't trigger.

The exact error message is Run-Time Error 87: an unexpected error has occured. Any guesses as to why this is happening?
 
I'm trying this one again, as I still haven't found any acknowledgement of the issue.

Does anyone know why a mailto: instruction that works in Access 2000 fails in 2003 if the character length goes somewhere above 450?
 
I don't have an answer for that, but have you considered just using the Outlook Object directly? That poses no restrictions and works in Access 2000 and 2003. I've never seen the FollowHyperlink used to email someone, only to hit webpages and internal network stuff. Will it allow you to attach the text to avoid the limit?
 
Thanks for the advice, Moniker. I have indeed gotten around this problem by using a SendObject instruction rather than the Hyperlink. The reason I prefer the Hyperlink, however, is because the SendObject demands that the user either send or close the email immediately. The Hyperlink allows the user to ignore the email momentarily, then come back to it later.

Although this is a tolerable workaround, I'm still baffled as to why Access 2003 would be unable to handle HTML code that worked fine in 2000.
 

Users who are viewing this thread

Back
Top Bottom