Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
StevenB
 
Posts: n/a
Default Word 2000, 2003, XP Question

Hi,
We have an application that uses Word 97. This app takes data from an SQL
2000 databse and inserts it into Word tables using SQL views. This works fine
using Word 97. When we attempt to use Word 2000, 2003 or XP the insertion
works but if the text is multi-lined and contains CR- LF charcters, they
appear as square hollow boxes and the text all appears on one line. We would
really like to move up to later versions of Word but this problem prevents
this. Anyone have any ideas how we can resolve this issue? Thanks in advance.

Steve
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default Word 2000, 2003, XP Question

Hi ?B?U3RldmVuQg==?=,

We have an application that uses Word 97. This app takes data from an SQL
2000 databse and inserts it into Word tables using SQL views. This works fine
using Word 97. When we attempt to use Word 2000, 2003 or XP the insertion
works but if the text is multi-lined and contains CR- LF charcters, they
appear as square hollow boxes and the text all appears on one line. We would
really like to move up to later versions of Word but this problem prevents
this. Anyone have any ideas how we can resolve this issue?

Difficult to give you an answer, since you don't detail how the data is put into
Word. Generally, though, word doesn't like CR-LF. If this is programming code,
try using vbCR (Chr$(13)) for new paragraphs. The same should work for Word 97,
so that you can continue to use the same code for all Word versions.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Posted to microsoft.public.word.docmanagement
PRedd
 
Posts: n/a
Default Word 2000, 2003, XP Question

I have exactly the same problem in Word 2000 vs Word 97.

I have a Macro that builds up a text string as follows:

Str$ = "Part 1" & Chr(13) & "Part 2 and 3"

The macro then tries to find a sting in the underlying document and replace
it with the text that has been built up, with the included formating (ie a
carrige return and line feed between Part 1 and the rest.

In Word 2000,if the test is found in a normal paragraph then the formatting
is fine. If the text is found within a table the the CHR(13) is presented as
a square box and the formattting is not valid.

What can I put in the string to ensure I get the required line break even if
the text to be replaced is in a table.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
PRedd
 
Posts: n/a
Default Word 2000, 2003, XP Question

Steven

I have discovered that if you replace the CHR(13) with a ^l (that a lower
case letter L) then it should introduce a manual line break which formats
correctly in a table or outside the table. Would you be able to preprocess
the string returned from your database prior to putting it into your word
table?

Hope this helps

Paul




"StevenB" wrote:

Cindy,

Thank you very much for responding. The data is retrieved from an SQL view
and is placed in the template by vb code. The CR-LF already exist in the SQL
fields. Word 97 seems to interpret the CR-LF correctly and formats
accordingly. Unfortunately Word 2000 and subsequent versions do not. I hope
this answered your question and you can then give me some advice.

Steven

"Cindy M -WordMVP-" wrote:

Hi ?B?U3RldmVuQg==?=,

We have an application that uses Word 97. This app takes data from an SQL
2000 databse and inserts it into Word tables using SQL views. This works fine
using Word 97. When we attempt to use Word 2000, 2003 or XP the insertion
works but if the text is multi-lined and contains CR- LF charcters, they
appear as square hollow boxes and the text all appears on one line. We would
really like to move up to later versions of Word but this problem prevents
this. Anyone have any ideas how we can resolve this issue?

Difficult to give you an answer, since you don't detail how the data is put into
Word. Generally, though, word doesn't like CR-LF. If this is programming code,
try using vbCR (Chr$(13)) for new paragraphs. The same should work for Word 97,
so that you can continue to use the same code for all Word versions.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default Word 2000, 2003, XP Question

You could use Chr(11) - a line break within a paragraph, but you seem to
have discovered this for yourself elsewhere in the thread?

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org


PRedd wrote:
I have exactly the same problem in Word 2000 vs Word 97.

I have a Macro that builds up a text string as follows:

Str$ = "Part 1" & Chr(13) & "Part 2 and 3"

The macro then tries to find a sting in the underlying document and
replace it with the text that has been built up, with the included
formating (ie a carrige return and line feed between Part 1 and the
rest.

In Word 2000,if the test is found in a normal paragraph then the
formatting is fine. If the text is found within a table the the
CHR(13) is presented as a square box and the formattting is not valid.

What can I put in the string to ensure I get the required line break
even if the text to be replaced is in a table.




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
Word 2003: Changing the increase/decrease rate of the indent icon? hayakaw1 Microsoft Word Help 11 December 22nd 08 09:58 PM
Word should allow to 'divide' page by 3 or 4, not just 2 CandasK Page Layout 2 February 28th 06 10:16 PM
Converting Word Perfect forms to Word forms elyse Microsoft Word Help 1 February 15th 06 08:17 PM
Word 2000 files opening inacurately in Word 2003 Tablet Convert Microsoft Word Help 1 December 4th 05 11:36 AM
In Word, how can I see all files (*.*) in "save as"? citizen53 New Users 8 April 4th 05 04:56 PM


All times are GMT +1. The time now is 06:04 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"