Odd behaviour in email mailmerge from Word

specsol

Registered User.
Local time
Today, 03:22
Joined
Feb 11, 2008
Messages
18
I have an an Access database which allows the user to select data to be available for mail merging via Word 2007. It selects the required data into a temporary table which word connects to via an ODBC connection. This works fine for standard mail merge (letters, envelopes, labels) I have been asked by the charity I created it for to also use it for mailmerging into emails. The data in the temporary table contains an email address (as a hyperlink) and when that hyperlink is clicked it opens up the default client as expected. In the mail merge process, at the end stage when the emails are sent to Outlook it fails because what is sent as the address is (for an actual address of someone@someisp.com) someone@someisp.com#mailto:someone@someisp.com# which Outlook does not recognise. I would have expected the address sent only to be like mailto:someone@someisp.com#
Any bright ideas anyone? Or am I being obviously stupid?
 
"at the end stage when the emails are sent to Outlook"
How are you actually doing this, can you post your code. It shouldn't be too difficult to achieve as it appears you can lookup an email address in your temporary table.
David
 
The problem only appears in the Mail Merge stage in word. The query correctly inserts the email address to my temporary table. Clicking on that address in the temporary table does open up the email cleint with the address correctly in the To field. The problem only occurs after the ODBC connection imports the data into the Word Mail Merge. At that stage (and before I click on the Electronic mail option to finally merge the data) the email field has the quoted value. I am currently exploring whether the problem is in the Outlook configuration (I do not use Outlook as the default email client and had to set it up for the database tests) since the Word Mail Merge seems to demand to send to Outlook
 
Eventually found the solution. Access data type hyperlink is coded as the string structure I quoted in the original post. To make things work the query that populates the temporary table should select not the field (email in tblPerson) which contains the hyperlink but an expression DisplayWebAddress:HyperlinkPart([tblPerson.email],1)
This stores the part of the hyperlink structure which Outlook needs for the email address and this is carried across by the ODBC conection to WORD whereas the hyperlink which could be clicked on in the temporary table is passed to WORD as the text structure of the hyperlink which OUTLOOK cannot interpret
 

Users who are viewing this thread

Back
Top Bottom