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 / General MS InfoPath Questions / April 2005

Tip: Looking for answers? Try searching our database.

Basic Text Formatting

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BillT - 24 Feb 2005 16:09 GMT
I need to be able to dynamically write some text to the form in a textbox (or
some kind of control, preferably one which can be unbounded, but I don't
think that's going to be possible) based on some of the fields edited by the
form's user.  This text needs to be selectable as I'm expecting the user to
cut and paste it.  At the moment I cannot figure out a way to print newlines
to the screen.  I really need to be able to format this text but any /n or
<br> just shows up as text.  I thought perhaps a rich text field would be the
ticket, but I can't seem to get that to work, either.  Any ideas?

Bill
G. Tarazi - 24 Feb 2005 17:49 GMT
To achieve that, you must use a rich text box, and the rich text box must be
linked to a data element in the schema (otherwise there is no other way to
access its contents).

Then you can assign and retrieve data from/to that box, getting the data is
simple, SelectSingleNode("path").xml , but assigning the data requires 2 XML
DOMS and some code, well, you can use the text property, but you will loose
the formatting. "Thanks to the Microsoft team who forgot that rich text
boxes can be assigned programmatically :-), I hope they remember this in the
next InfoPath and have a single function for that".

Just search google to get how to assign a rich text box with a value.

The contents of the box are XHTML (sort of), you can get more info from this
link about XHTML

http://www.w3.org/TR/xhtml1/

> I need to be able to dynamically write some text to the form in a textbox (or
> some kind of control, preferably one which can be unbounded, but I don't
[quoted text clipped - 6 lines]
>
> Bill
Nicole - 25 Apr 2005 14:30 GMT
Hello Mr. Tarazi.

Can you please give a sample code on how to assign
xhtml data into a rich text box.

I've been pulling out my hair trying to achieve this
but after almost a week of searching my search turns out empty.

Many thanks and kind regards.
 
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.