Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Controlling the Italic Text Attribute.

Controlling the Italic Text Attribute

by Allen Wyatt
(last updated May 11, 2013)

3

Word allows a rich set of formatting attributes for text in a document. You can control the italic attribute in your macros by setting the value of the italic property. The syntax if you are using VBA is as follows:

Selection.Font.Italic = toggle

where toggle is either False (turns off the italic attribute) or True (turns on the italic attribute).

If you omit a toggle value, the statement will simply change the current setting of the italic attribute—italic text becomes non-italic and vice-versa.

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (730) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Controlling the Italic Text Attribute.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Turning Off Document Protection

If you protect your document using the tools that Word provides, at some time you may need to turn off that protection. ...

Discover More

Repaginating in a Macro

When creating a macro that extensively processes a document, you may need to periodically force Word to repaginate the ...

Discover More

Resetting Default Character Formatting

If you need to remove any explicit character formatting from some text, you'll want to commit the shortcut in this tip to ...

Discover More

The First and Last Word on Word! Bestselling For Dummies author Dan Gookin puts his usual fun and friendly candor back to work to show you how to navigate Word 2013. Spend more time working and less time trying to figure it all out! Check out Word 2013 For Dummies today!

More WordTips (menu)

Ignoring Smart Quotes when Comparing Text

When comparing two pieces of text, you may find that Word's smart quotes can mess up the comparison. Here's a quick way to ...

Discover More

Turning Off Screen Updating

When working with macros, you can often speed up processing by turning off the updating of the screen. Best news is that it ...

Discover More

Determining a Paragraph's Style in VBA

When processing a document via a macro, it is often helpful to understand what style has been applied to a paragraph. You can ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 8Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is eight minus 3?

2014-10-22 15:03:21

Kevin

I think if you are trying just to toggle the italic attribute of text in VBA, the syntax is Selection.Font.Italic = wdToggle. Just leaving the toggle value blank doesn't seem to work for me.


2014-10-22 15:02:46

Kevin

I think if you are trying just to toggle the italic attribute of text in VBA, the syntax is Selection.Font.Italic = wdToggle. Just leaving the toggle value blank doesn't seem to work for me.


2014-10-22 15:02:41

Kevin

I think if you are trying just to toggle the italic attribute of text in VBA, the syntax is Selection.Font.Italic = wdToggle. Just leaving the toggle value blank doesn't seem to work for me.


This Site

Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.