Jump to content
Macro Express Forums

Recommended Posts

Posted

Hi,

 

Great Software!!!

 

I have a quick question. I want to replace carriage returns with a delimiter instead of stripping them because when I strip carriage returns the last word on the first line becomes attached to the first word on the second line (see fig. 1 below). If I could replace carriage returns with a space (but ideally a delimiter) this would be really great!!!

 

Thanks.

 

Alex P Limbert

 

 

(Fig 1.)

 

123 Main St

456 Centre Ave

 

[Current Status]

 

123 Main St456 Centre Ave

 

[Desired Results]

 

123 Main St[DELIMETER]456 Centre Ave

Posted

Hi,

I guess you will have your answer in astring, so at the appropriate time, say the string is "T1", replace as below; [copy the first quoted code to script editor]

<REM2:Set Environment variable "CRLF" to cr/lf characters><ASCIIC:2:1:10><ASCIIC:3:1:13><TMVAR2:08:03:02:000:000:><TMVAR2:19:03:00:000:000:CRLF><REM2:Replace Environment variable "CRLF" in String T1 with space><TMVAR2:21:01:01:000:000:%CRLF% >
// Set Environment variable "CRLF" to cr/lf characters

Variable Set %T2% to ASCII Char of 10

Variable Set %T3% to ASCII Char of 13

Variable Modify String: Append %T2% to %T3%

Variable Modify String: Save %T3% to Environment Variable

// Replace Environment variable "CRLF" in String T1 with space

Replace "%CRLF%" with " " in %T1%

Best, Randall

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...