Passing a string to Outlook

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
Back
Top