Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Long Documents / October 2003

Tip: Looking for answers? Try searching our database.

Special characters appearing in form Fields in Word

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Collin - 23 Oct 2003 17:03 GMT
We Have an EJB Application which gets Data from the Database which is
containts the Follwoing format ELEMENTNAME=DATA^ELEMENT... , The
Element name Represent the BOOKMARK name for the the Form Fields,. The
data retrieved By the EJB Application is Processed by a COM Object
which opens a Handle to the Template which contains the FORM FIELDS
Defined with the Bookmarks. Most of the Element Data gets populated
Correctly to the FIELDS. We are having some problemd with setting the
Data to a form field which contains line breaks. When the Document is
generated and Opened, In the Form Field which the Multiple Line Data
was Set , we can see some box ( special Character ) appearing before
the start of the next line.  I have tried to check the String which
has the Line Breaks. The Line Break characterrs in the string are
\r\n. I have verified this , by displaying character by character as a
byte as well. and also opening the string in a  binary editor.

Just to add to it, we use _com_util::convertBSTRToString( ) in the COM
Object for formatting the string before it is set on the Field.

In Some Cases the Paragraphs work fine with no special character. this
happens only certain time. To verify if the line were any different, i
also checked the paragraph which works fine to check for anything
different. all i found was a \r\n

Let me know if any one has encountered such an issue. Is this issue
related to word or related to the way COM object formats the string.

Thanks

Collin
Cindy M  -WordMVP- - 27 Oct 2003 23:18 GMT
Hi Collin,

\r\n means nothing to me. What ANSI codes do these represent? Generally,
Word prefers Chr$(13) (vbCR in VB-speak) and Chr$(10) (line feeds) can
cause problems.

Another factor you have to watch out for is form fields in table cells.
If the table cell does not contain a paragraph mark, itself, this can
result in paragraphs inserted using VBA to display boxes.

> We Have an EJB Application which gets Data from the Database which is
> containts the Follwoing format ELEMENTNAME=DATA^ELEMENT... , The
[quoted text clipped - 22 lines]
> Let me know if any one has encountered such an issue. Is this issue
> related to word or related to the way COM object formats the string.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
http://www.mvps.org/word

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.