Copying text in a field including the font style
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Copying text in a field including the font style
I am writing a character map program for mac and am having problems copying the rtf text in a field. I am using this code to copy the field contents:
set the clipboard data["rtf"] to the rtf text of field "CharsToCopy"
But when I paste it into word, the font is different. Any ideas why this isnt working?
set the clipboard data["rtf"] to the rtf text of field "CharsToCopy"
But when I paste it into word, the font is different. Any ideas why this isnt working?
Re: Copying text in a field including the font style
Hi.
Do you have a typo in that you separate the words "clipboard" and "data"?
Anyway, try using "the htmlText" property. This preserves the text attributes.
Craig Newman
Do you have a typo in that you separate the words "clipboard" and "data"?
Anyway, try using "the htmlText" property. This preserves the text attributes.
Craig Newman
Re: Copying text in a field including the font style
Yes Craig, sorry about that, I did use clipboarddata and rtftext as single words but it still didn't work
Re: Copying text in a field including the font style
So, how about the htmlText?
Craig
Craig
Re: Copying text in a field including the font style
OK lets roll these 2 topics into 1
Jasper500.. don't double post your questions and if you can post a stack that displays this problem
Hi Craig.
Simon
Jasper500.. don't double post your questions and if you can post a stack that displays this problem

Hi Craig.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Copying text in a field including the font style
If you haven't set a specific font for the field text, it will inherit the default font from the IDE. That means both the rtf and html text won't have a font specification when you copy it. When you paste it into Word, since there is no font specified, Word will use its default font.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Copying text in a field including the font style
Hi Jacque, I have indeed set the font type for the field and Craig I tried to post my stack on the forum, but was not allowed to, presumably because I am new to the forum. However I am narrowing down the problem in that the code : set the clipboarddata["rtf"] to the rtftext of field "CharsToCopy" works for ASCII characters 0 to 127. Characters from 128 to 255 are different to the ones expected.
I suspect that I might have to use unicode, so will look into this further.
I suspect that I might have to use unicode, so will look into this further.