Reply
 
Thread Tools Display Modes
  #1   Report Post  
Bob Inwater
 
Posts: n/a
Default Extra Characters

I am writing a VBA Mac that will read a table from Word and populate a MS
Project File. I have most of it worked out so far except that I have to trim
the (what do ya call them?) square characters (Cell Markers?) from the text
in each cell. That would be no big deal if there was always the same number
before and after each string. Since they do not show up consistently I have
having trouble editing them out.

First of all what is the proper name for this character and secondly any
ideas deleting them on a conditional basis?

Thanks a Ton,

Bob

  #2   Report Post  
Jezebel
 
Posts: n/a
Default

Every cell terminates with chr(13)chr(7). chr(13) is simply a return (vbCR)
same as any end-of-paragraph; chr(7) is used by Word as the end-of-cell
marker Normally you can just strip the final two characters from the cell
contents; but your reference to consistency suggests that you have something
else going on as well -- presumably an artefact of how the cell contents are
formatted. You can use the ASC() function to determine what the characters
actually are, and use the Replace() function to remove them.





"Bob Inwater" wrote in message
...
I am writing a VBA Mac that will read a table from Word and populate a MS
Project File. I have most of it worked out so far except that I have to
trim
the (what do ya call them?) square characters (Cell Markers?) from the
text
in each cell. That would be no big deal if there was always the same
number
before and after each string. Since they do not show up consistently I
have
having trouble editing them out.

First of all what is the proper name for this character and secondly any
ideas deleting them on a conditional basis?

Thanks a Ton,

Bob



  #3   Report Post  
Bob Inwater
 
Posts: n/a
Default

Thanks a Ton! I added the below code and it works great.

If Left(x, 1) = Chr(13) Then
x = Right(x, Len(x) - 1)
End If

If Right(x, 1) = Chr(13) Then
x = Left(x, Len(x) - 1)
End If


"Jezebel" wrote:

Every cell terminates with chr(13)chr(7). chr(13) is simply a return (vbCR)
same as any end-of-paragraph; chr(7) is used by Word as the end-of-cell
marker Normally you can just strip the final two characters from the cell
contents; but your reference to consistency suggests that you have something
else going on as well -- presumably an artefact of how the cell contents are
formatted. You can use the ASC() function to determine what the characters
actually are, and use the Replace() function to remove them.





"Bob Inwater" wrote in message
...
I am writing a VBA Mac that will read a table from Word and populate a MS
Project File. I have most of it worked out so far except that I have to
trim
the (what do ya call them?) square characters (Cell Markers?) from the
text
in each cell. That would be no big deal if there was always the same
number
before and after each string. Since they do not show up consistently I
have
having trouble editing them out.

First of all what is the proper name for this character and secondly any
ideas deleting them on a conditional basis?

Thanks a Ton,

Bob




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to insert Asia characters Andrew Microsoft Word Help 1 March 3rd 05 10:14 AM
extra long lines and word split at end of line without hyphenation RSA2004 Microsoft Word Help 1 January 28th 05 12:15 PM
Hidden Text causes extra white space & extra pages Lyndon S. Microsoft Word Help 1 January 19th 05 05:49 PM
International characters in mail merge sandra Mailmerge 1 December 23rd 04 05:42 AM
formatting links from excel into word (extra line feeds) JGT Microsoft Word Help 1 December 9th 04 11:01 AM


All times are GMT +1. The time now is 08:03 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"