Memo field default Font & Font Size

E

efandango

Is there a way of making any text that I paste into a memo field conform to
one font style and size? Arial 9pt, for example.

I cut and paste text from all kinds of sources and find that the pasted text
comes in with the original source font style and size.
 
S

strive4peace

Hi Eric,

paste into NotePad first -- then copy and paste from NotePad...

unless you are using a rich text control, however, it should not make a
difference...

Warm Regards,
Crystal

remote programming and training

Access Basics
8-part free tutorial that covers essentials in Access
http://www.AccessMVP.com/strive4peace

*
:) have an awesome day :)
*
 
A

Allen Browne

Eric, I used Crystal's approach for years, and it works well.

In recent years, I have installed a little app named PureText from
SteveMiller. After copying to clipboard, you click the PT icon in the system
tray, and it converts the contexts to text. It's one of those minimalist
apps that it's hard to live without. Download from:
http://www.stevemiller.net/puretext/
 
E

efandango

Crystal,

thanks for the notepad tip. I was rather hoping there was some type of
switch or code that would just convert any text pasted into a specified font
& size. It always amazes me how the blindingly obvious escapes the attention
of Microsoft's testing and usability people...

I may look at Allen Browne's suggestion too (thanks Allan).
 
A

AndrewOfAzotus

For me, (access 2k3) text pasted into a memo field does take on the memo
field font.

In any case, can't you use the after_update event and just reset the font

Andrew/
 
E

efandango

Andrew,

I'm using Access 2007, and it doesn't fo it for me, perhaps it's because i'm
using the rich text for the Text Format default setting. How would I use the
afterupdate reset font, do you have a code example?
 
A

AndrewOfAzotus

OK, this works in 2k3:

Private Sub ResText_BeforeUpdate(Cancel As Integer)
Me.<FieldName>.FontName = "Arial"
Me.<FieldName>.FontSize = 24
End Sub

although a fontsize of 24 is a little big :)

Andrew/
 
E

efandango

I tried this on both, before and after update; but it doesn't work on pasted
text from say an HTML page... I'm using Access 2007.

Private Sub Start_Note_BeforeUpdate(Cancel As Integer)
Me.Start_Note.FontName = "Arial"
Me.Start_Note.FontSize = 10
End Sub


Private Sub Start_Note_AfterUpdate()
Me.Start_Note.FontName = "Arial"
Me.Start_Note.FontSize = 10
End Sub
 
E

efandango

However, If i convert the memo field Format Type from 'Rich Text' to 'Plain
Text' I find that whatever I paste defaults correctly to the default font and
size set in the Form Field properties. This works without the set text before
or afterupdate code.

In an ideal world, I wanted to retain the Rich Text functionality but still
have all pasted text default to a predetermined font & size.
 

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