Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

script text bold

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Script text in Bold

Script text in Bold

ResolvedVersion 2016

Vicki has attended:
Excel VBA Introduction course

Script text in Bold

Hi, does anyone know how I might write script to insert text which is bold?

I want to say if this button is true typetext "blah blah blah" but I want the blah's in Bold

thanks so much

RE: Script text in Bold

Hi Vicki,

Thank you for the forum question.

Try something like:

If Me.OptionButton1 = True Then
Wdoc.selection.Font.Bold = True
wdoc.Selection.typetext "blah blah blah"
ElseIf Me.OptionButton2 = True Then
Wdoc.selection.Font.Bold = False
wdoc.Selection.typetext "blah blah blah"
End If



Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Wed 1 Aug 2018: Automatically marked as resolved.

 

Training courses

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.

Excel tip:

Autonumber in Excel

To create an autonumber field, can use the Offset() function.

In cell A1, enter the number 1.
Then in cell A2, enter this formula:

=OFFSET(A2,-1,0)+1

Then copy the formula from cell A2, down as far as you need.

See also: Autonumber in Excel forum post.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.