Get rid of [cr] symbol when export to excel

  • Thread starter Thread starter lywong
  • Start date Start date
L

lywong

I have a address field with property set to multi-line.
When I write a vbscript to export the address to excel, it includes th
carriage return symbol.
Anyway to get rid of all the [CR]symbols in the address field?

Thank
 
Use the Replace function to replace the CR with some other character such as
a comma or just with "".
 
Hi Ken,

Is this the statment to write?
billtoper=objControls("BillToPer").Value
objWS.Cells(intRow+29,intCol)=Replace(billtoper,chr(13),"")

It doesnt seem to work. After extract to Outlook, it still appear th
funny symbol.

Pls advice. Thank
 
Hi Ken,

Is this the statment to write?
billtoper=objControls("BillToPer").Value
objWS.Cells(intRow+29,intCol)=Replace(billtoper,chr(13),"")

It doesnt seem to work. After extract to Outlook, it still appear th
funny symbol.

Pls advice. Thank
 
A newline consists of both a CR and an LF. I imagine you got rid of the CR
and the LF is still there. Instead of using Chr(13) you can use vbCRLF or
you can use Chr(13) and then a Replace also on Chr(10) ' linefeed.

The interface you are using to post doesn't include any of the preceding
thread, which makes things very hard to follow. Please do so manually.
 
Back
Top