Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 2003: Changing the increase/decrease rate of the indent icon? | Microsoft Word Help | |||
Word should allow to 'divide' page by 3 or 4, not just 2 | Page Layout | |||
Converting Word Perfect forms to Word forms | Microsoft Word Help | |||
Word 2000 files opening inacurately in Word 2003 | Microsoft Word Help | |||
In Word, how can I see all files (*.*) in "save as"? | New Users |