Changing default font when pasting to form from clipboard

J

John Garvey

I would like the text stored in a memo field to be formatted as Calibri 10.
But whenever I paste from the clipboard to the control on my form, the text
that is pasted always shows up formatted in Times New Roman. Each time I
have to select the text and reformat to Calibri 10.

The data type for the field is "memo," rich text format. The font
properties for the control have been set to Calibri 10. I'm doing a high
volume of copying/pasting from a variety of other resources so i'd like to
eliminate having to reformat the text every time after pasting. Is there
some setting I can change that will allow me to correct this?
 
A

Al Campagna

John,
I just set up a little test. I copied some Times New Roman data onto
the clipboard, and pasted it into a memo field, and the font was correctly
converted to Calibri.
So, there may be something amiss here.

Just for an expirement, try using the Memo field's AfterUpdate event to
force the font back to Calibri.

In my test, I forced the font to Dixieland, and every record I pasted
into (during that form session) pasted in as Dixieland. When I closed the
form and reviewed my changes, all the memos were in Calibri (as designed).

I'm concerned that my suggestion may be off the mark, as I wasn't able
to duplicate your problem.
PS: I also copied and pasted some text from a web page, and my text
pasted in correctly as Calibri.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
J

John Garvey

Thanks Al. Can you suggest the code to use in the AfterUpdate event? I
don't know how to do that and I havent been able to find it online anywhere.
--
Thank you,

John Garvey


Al Campagna said:
John,
I just set up a little test. I copied some Times New Roman data onto
the clipboard, and pasted it into a memo field, and the font was correctly
converted to Calibri.
So, there may be something amiss here.

Just for an expirement, try using the Memo field's AfterUpdate event to
force the font back to Calibri.

In my test, I forced the font to Dixieland, and every record I pasted
into (during that form session) pasted in as Dixieland. When I closed the
form and reviewed my changes, all the memos were in Calibri (as designed).

I'm concerned that my suggestion may be off the mark, as I wasn't able
to duplicate your problem.
PS: I also copied and pasted some text from a web page, and my text
pasted in correctly as Calibri.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

Al Campagna

John,

Private Sub YourMemoFieldName_AfterUpdate()
YourMemoFieldName.FontName = "Calibri"
End Sub

The AfterUpdate event will fire (after the Paste) when you tab out of
the memo field.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."

John Garvey said:
Thanks Al. Can you suggest the code to use in the AfterUpdate event? I
don't know how to do that and I havent been able to find it online
anywhere.
 

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