Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2002 Text to Table different from Word 2000

Status
Not open for further replies.

DrSimon

IS-IT--Management
Dec 14, 2001
674
2
18
GB
Dear All
I create a tab delimited text from from another application and have been using Word 2000 'Convert Text to Table'with Tab as a separator to convert it to a table. I then run my own macro which 'tidies' the document.

I have started to investigate Word 2000 and found that when I open the text file, Tab and end of line characters are interpreted differently so that I cannot convert to a table as now.
I would be very grateful if any knows how to get round this.

Simon Rouse
 
Just in case anyone else has the same problem - I've solved the above by replacing Chr(13) with "^p". Would be interested if someone could tell me what "^p" actually represents.
 
^p = paragraph marker.
When you use convert text to table you have the option of using paragraph markers (^p) or tab characters (^t).
Are you using the REPLACE feature to tidy up your work? Also, activate the show non-printing characters button (next button to the left of the zoom percentage box)
 
Thanks jbobby
I know that ^p is paragraph marker, what I wandered was how it was represented as control character(s).

Displaying non-printing characters is what actually starts to reveal the difference between 2000 & XP. When I open the flat file file using Word 2000, chr$(13) [Carriage Control] is happily interpreted as ^p and displays the appropriate character and table conversion is no problem. This is completely different from Word 2002 where chr$(13) is not displayed as any character (not even a square) - table conversion will not work using the standard foreground actions.

The only thing I could find to work was to use a VB macro which included the code:
.Text = Chr(13)
.Replacement.Text = "^p"

I suspect that the interpretation of chr$(13) by Word 2000 and its predecessors was considered to be a bug by Microsoft and has been removed! Comments by anyone would still be interesting

Simon Rouse
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top