Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems inputting data to RTF control

Status
Not open for further replies.

bodmin

Technical User
Apr 1, 2004
98
GB
I have an active-X RTF control on an Access form, I am trying to use this control to enter an XSL document into the table that is then called by the backend system to transform a particular XML message.

The problem I have is that whenever I enter the XSL document into the RTF control and then navigate the form away in order to save the record, the XSL document that is stored in the table has several lines of format information at the start. Like in the example below:

{\rtf1\ansi\ansicpg1252\deff0\deflang2057......}

I am unable to edit the record directly in table view as the text is too long to be edited. The length of the text I am trying to paste into the system also means that is not possible to use a memo textbox, as far as I am aware, as this control states that the text is too long to be edited.

I am unsure whether this is due to the settings of the RTF control or whether it is to do with the where the input text has been copied from.

Iam completely stucked and have tried most things anybody got any ideas?
 
I'm totally not familiar with the control so if i miss this completely....

But is it possible to fill the table per row and per field? If so:

Dim the field name as string, and cut off the first X characters like Right([Fieldname];len([Fieldname])- len(\rtf1\ansi\ansicpg1252\deff0\deflang2057))

One never knows...

Flippertje
 
The problem I would have there is that the format information does not appear to be a uniform length, it varies depending on the XSL which the user was trying to input.

For example I have one format section of the string that is the following:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Arial;}{\f1\fnil\fcharset0 MS Sans Serif;}}

There is also another format section of a string that is only this length:

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}

Therefore I would not be able to determine how long the sub-string that needs removing will be, any ideas how to select the length of this format info?
 
What info of these strings would you like to import?

grtz Flippertje
 
Flipper,

I want to be able to remove all of this format information that is inserted by the control. I am trying to paste an XSL stylesheet into a database system by using this control, and it always adds the format information into the database table but then the rtf control does not display this string, it just uses it for formatting.

I need the stylesheet to go into the database without any formatting information as the stylesheet is applied by the back end system which retrieves the XSL from the database
 
so why don't you measure the length of the string starting the first '{' and the last '}' ?
That would solve youre problem.. wouldnt it?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top