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?
Copying text in a field including the font style
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Copying text in a field including the font style
Hi jasper500,
You've split both the clipboardData and rtfText into 2 words...
set the clipboard data["rtf"] to the rtf text of field "CharsToCopy" --incorrect
set the clipboarddata["rtf"] to the rtftext of field "CharsToCopy" --correct
Simon
You've split both the clipboardData and rtfText into 2 words...
set the clipboard data["rtf"] to the rtf text of field "CharsToCopy" --incorrect
set the clipboarddata["rtf"] to the rtftext of field "CharsToCopy" --correct
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
Hi Simon, I'm afraid that was my typo, I did use rtftext and clipboarddata as single words but it still doesn't work. I've been at this for about a week and this is the only bit I need to fix. I just can't get the font type to copy.
Re: Copying text in a field including the font style
Hi jasper500,
I think you have to say which font and which characters as I just did a test here with Word and Batang font and it worked using the above code.
I am on a Win machine so that may be the difference (but shouldn't).
hmmm... maybe just having the font and characters is not enough. Better you build a small stack that displays the problem and post it here.
Simon
I think you have to say which font and which characters as I just did a test here with Word and Batang font and it worked using the above code.
I am on a Win machine so that may be the difference (but shouldn't).
hmmm... maybe just having the font and characters is not enough. Better you build a small stack that displays the problem and post it here.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!