@GetDocField and RTF

I have a form with a RTF defaulting to a RTF field in another document.I use @GetDocField to get the content but the Font is changed from Arial to Default Monospace.

Both field default font is Arial and the content is transferred properly, keeping font size, bold and other properties that the user may have set in the text.

Just the Font is missed.

Anyone can help me please.

Thx

Subject: RE: @GetDocField and RTF

Fonts are funny – the list of fonts you’re using is actually stored in a different item, $Fonts, not in the rich text item itself. The rich text refers to the fonts by an index number giving their position in this list. So if you copy the RT item without the fonts list, there is a mess-up and the RT doesn’t know which fonts to use.
You might have better luck copying the rich text item with back-end LotusScript code. Create the new document in memory, assign its fields, then use EditDocuent method to open it. You might have to copy the $Fonts explicitly.

Subject: RE: @GetDocField and RTF

I actually wrote that note you’re referring to.

The default text styles have permanent numbers not listed in the $Fonts list – because they’re the defaults. If you change your default sans serif to Arial then all text coded as default sans serif will appear as Arial for you. But other people who view the document that you create this way will see the text in their default font selection.

If you really want to copy the font exactly, you will have to use LotusScript. I’m reasonably sure it’s smart enough to copy over the relevant $Fonts entries when you copy the rich text item; if not, you can copy the $Fonts item over yourself.

Subject: RE: @GetDocField and RTF

Many thanks for the comprehensive explanation, I am undestanding more about Notes

Subject: RE: @GetDocField and RTF

Thanks for your reply.

I read on page 702 of Domino Designer 6 red book:

Restriction: You can’t copy file attachments, embedded objects, and fonts

(other than the Notes default fonts) using macro language

I tried changing User->Preferences->Default Fonts->Default monospace fonts to Arial and now the characters copied via @getDocFiled are formatted in Arial.

I don’t know what I am messing up this way :slight_smile: