Group:  Microsoft Word ยป microsoft.public.word.vba.beginners
Thread: Font formatting in a userform text box

Geek News

Font formatting in a userform text box
Neil Humphries 11/3/2008 4:01:02 PM
I want to create a splash screen with user instructions. To be most readable,
the titles for the different paragraphs should be bold, but the paragraph
should not be.
Can this be done in a text box? If not, what approach should I be using?

Private Sub UserForm_initialize()
Dim Text As Variant
Text = "Controls for editing are on the custom Add-in toolbar" & vbCrLf
& vbCrLf
Text = Text & "This Title should be bold:" & vbCrLf
Text = Text & "The vertical bar ... this should not be bold
Text = Text & vbCrLf & "This Title also should be bold:" & vbCrLf
Text = Text & "You can toggle hidden text... this should not be bold." &
vbCrLf
TextBox1.Text = Text
End Sub

Re: Font formatting in a userform text box
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 11/3/2008 7:07:26 PM
Multiple text boxes.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Neil Humphries" <NeilHumphries[ at ]discussions.microsoft.com> wrote in message
news:C1B23934-54C4-4AF1-98DD-D110AA17DE27[ at ]microsoft.com...
[Quoted Text]
>I want to create a splash screen with user instructions. To be most
>readable,
> the titles for the different paragraphs should be bold, but the paragraph
> should not be.
> Can this be done in a text box? If not, what approach should I be using?
>
> Private Sub UserForm_initialize()
> Dim Text As Variant
> Text = "Controls for editing are on the custom Add-in toolbar" & vbCrLf
> & vbCrLf
> Text = Text & "This Title should be bold:" & vbCrLf
> Text = Text & "The vertical bar ... this should not be bold
> Text = Text & vbCrLf & "This Title also should be bold:" & vbCrLf
> Text = Text & "You can toggle hidden text... this should not be bold."
> &
> vbCrLf
> TextBox1.Text = Text
> End Sub
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net