Jump to content
Macro Express Forums

Measure the space that will be copied


Amerifax-Bob

Recommended Posts

This is the line of text I'm working with:

County: LA CROSSE (55063)

 

I have to high light "LA CROSSE". Which I will end up coping.

 

Control rtarrow rtarrow will get me to the right of the "L"

Using UltraEdit (Find)

Text Type: <ALT>s

Text Type: (<ENTER>c

This will take me to the right of (55063)

 

I need away to tell I have 9 charactors to copy, encluding the space. The text is from a database and the LA CROSSE could be and county name. Some are single as in "Milwaukee" and others are as "LA CROSSE".

 

Bob

Link to comment
Share on other sites

It's best to manipulate it in a variable. Copy the entire string to T1. Delete part of text 8 characters from 1 to get rid of the county. Now get the position of the open paren and call that N1. Subtract 2 from N1 to get the last character of the county name. Now copy part of text T1 from 1, N1 char long to T1 (overwrites). Optionally you could copy it to another var like T2 if you wanted to now get the zip too. Now no mater how many spaces you're set!

<TVAR2:01:02:FGive me a test stringFFCenter:Center><TMVAR2:11:01:00:001:008:><IVAR2:01:13:1:(><NMVAR:02:01:1:0000001:2:0000002><TMVAR2:10:01:01:001:N01:><TBOX4:T:1:CenterCenter000278000200:000:Result%T1%>

Link to comment
Share on other sites

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...