Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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
![]() |
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
Thread | Forum | |||
How to insert Asia characters | Microsoft Word Help | |||
extra long lines and word split at end of line without hyphenation | Microsoft Word Help | |||
Hidden Text causes extra white space & extra pages | Microsoft Word Help | |||
International characters in mail merge | Mailmerge | |||
formatting links from excel into word (extra line feeds) | Microsoft Word Help |