Formatted default text for Rich Text Box control

K

K''''ur

How could I add a formatted default text to a Rich Text Box control without
doing any custom coding (I mean just through the GUI). Is it possible anyways?

Please help,
Thanks,
Keyur
 
S

Scott L. Heim [MSFT]

Hi Keyur,

In order to get formatted default text in a Rich Text control you will need
to extract the form files and set what you want in the Template.XML file.

Let me know if you would like sample steps...

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

K''''ur

Thanks Scott,

Well do let me know the steps if there are any additional steps involved
over and above,
File/Extract form files... and than actually editing the Template.XML
Where do I save it? (at the same location where I extracted it!!)

Thanks,
Keyur Shah
 
S

Scott L. Heim [MSFT]

Hi Keyur,

You are correct - extract the form files and open Template.XML with, say,
Notepad. Locate the field for your Rich Text Control and then add the
necessary XML. So as an example, my Rich Text control is named field1, I've
added the word "Test" to the default value field but I want it to be bold.

So currently, in Template.XML I see this:

<my:field1>Test</my:field1>

In order to see this default text with a bold font, I modified this to the
following:

<my:field1><strong
xmlns="http://www.w3.org/1999/xhtml">Test</strong></my:field1>

I hope this helps!

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

K''''ur

Thanks again scott, but my question still remains, where do I save the
template.xml after modifying. I tried it by saving it at the same location
where I extracted it, but it didnt worked.

Help.

Thanks,
Keyur
 
S

Scott L. Heim [MSFT]

Hi Keyur,

My apologies - I missed that part. Once you modify the Template.XML file,
you will need to right-click on Manifest.XSF, choose Design and then do a
File->Save As to re-save this as an XSN file.

Let me know if this works for you!

Best Regards,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 
K

K''''ur

I got it. Thanks Scott. But one last doubt to confirm. Once we re-save the
manifest file as an XSN file, will that become the original file and can i
discard the previous original file from which I actually extracted all these
files.
 
S

Scott L. Heim [MSFT]

Hi Keyur,

When you open the Manifest.XSF file in Design View and choose File->Save
As, you can either create a new XSN file or simply overwrite your previous
XSN file...whichever you prefer.

Me personally? I am paranoid by heart, so I always keep backups after
making changes until I am sure I did everything correctly! <G>

Take care,

Scott L. Heim
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top