Passing a string to Outlook

N

Nick

I am passing a string in the senditem function to the To field in a email
message. The string looks like this in VBA Smith, John - UK but when it is
passed to outlook it looks like this Smith; John - UK. Can anyone tell me how
to stop the comma being replaced with a semi colon.

Cheers

Nick
 
T

Tim Ferguson

The string looks like this in VBA Smith, John - UK but when it is
passed to outlook it looks like this Smith; John - UK. Can anyone tell
me how to stop the comma being replaced with a semi colon.

This sounds like an Outlook problem -- many emailers use commas to separate
addresses on the To line, but for some reason MS decided to go with
semicolons. If you type a comma in the address line it will get changed
too. In fairness, an email address like

Smith, John <[email protected]>

is illegal under the RFC for the obvious reason anyway.

You will probably be safe and legal by wrapping the clear text part in
quote marks, so you could try this:-

"Smith, John" <[email protected]>

HTH


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top