The Secret Life of Word
eBook - ePub

The Secret Life of Word

A Professional Writer's Guide to Microsoft Word Automation

  1. 274 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

The Secret Life of Word

A Professional Writer's Guide to Microsoft Word Automation

About this book

The Secret Life of Word looks at Microsoft Word from the perspective of technical and other professional writers. It gives writers an in-depth look at the hidden capabilities of Word, and shows how to take advantage of those capabilities without being a programmer.

The Secret Life of Word will help you master the full gamut of Word mysteries, including AutoCorrect, QuickParts, BuildingBlocks, macros, Smart Tags, program-less VBA programming, and much more. There's something here for everyone who uses Microsoft Word, from new users to experts.

Inside the Book

  • Preface
  • Introduction to Word Automation
  • Creating Macros
  • Find and Replace
  • Fields, Form Fields, and Content Controls
  • AutoCorrect and AutoText/Building Blocks
  • Smart Tags
  • Exchanging Data
  • Code Samples
  • Automation Related Topics
  • Glossary, Bibliography, and Index

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere β€” even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access The Secret Life of Word by Robert Delwood in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Information

The Secret Life of Word

A Professional Writer's Guide to Microsoft Word Automation

Robert Delwood

XML Press

Chapter 1. Preface

Describing Microsoft Office Word as just a word processor understates the capabilities of this versatile application, which is used by nearly a billion people worldwide. The designers anticipated a broad range of possible uses and planned wide latitude for customization. Word is now part word processor, spreadsheet, database, and Web editor. It's also a programming platform.
After the introduction of the Visual Basic editor in Word 97, Word gained popularity for its ability to automate the most mundane and repetitious tasks. Complex calculations can be performed in automatically updating containers (called β€œfields”), and strings of tasks can be chained together into a single operation (called a β€œmacro”).
This book introduces two forms of Word automation:
  • User interface: This form of automation uses items that can be selected from the user ribbon or placed in the document. Examples include user forms, fields, Quick Parts (new in Office 2007), and user controls such as text input areas, and checkboxes.
  • Macros: The other form of automation, macros, is perhaps less familiar. Macros let you record and recall tasks so you don't have to repeat them step-by-step. Your use of macros can include: running ones others provide to you, recording your own, modifying recorded macros, and programming macros.
Each chapter focuses on one aspect of automation, providing examples, techniques, and where applicable, macros.

1.1. Who Should Read This Book

This book is for Word users who want more control and insight into Word's automation capabilities. Automation was never intended to only be for programmers. Instead, automation is equally useful for writers. To be clear, this book is not about programming or making you a programmer. I understand not everyone is interested in becoming a programmer just to accomplish everyday tasks. Instead, I intend to jump start the automation process and enable you to write automation solutions yourself.
I assume you have some experience with Word. Although many of the examples include detailed step-by-step procedures, this is not a Word tutorial. Automation is partly about stringing Word functions together, but knowing what those functions are – their options, the right combination, and the right sequence – is up to you. Seasoned Word users, or β€œpower users,” can benefit from this book, but so can less experienced users.

1.1.1. Word Versions

Most of the examples and topics are applicable to all versions of Word, including Word 97, Word 2000, Word XP, Word 2003, Word 2007, and Word 2010. Where this is not the case, I will state which versions apply. For example, Building Blocks and Quick Parts were introduced in Word 2007 and will not be applicable to earlier versions.

1.2. How to Use This Book

This book takes a pragmatic and realistic approach to learning automation. It is part cookbook and part tutorial. I encourage you to work through the examples line by line. For code examples, you can type the code into the integrated development environment (IDE) or copy and paste from the electronic samples provided on this book's website. Feel free to experiment and try variations.
The coding style and examples are different throughout the book, allowing you to see differences and make your own choices. For example, unless otherwise noted, samples use For...Next loops and For...Each loops interchangeably. Since the automation challenges differ for each writer, no book of examples can address them all. Instead, study several examples and use whichever examples and code work best to construct the solution you need.

1.3. Book Structure

This book uses a tutorial and cookbook approach to introduce Word's automation concepts. Each chapter introduces a new aspect of automation. I first explore basic procedures, followed by automation techniques, and finally VBA (Visual Basic for Applications) with code examples. VBA can almost always be used to supplement automation techniques available through the user interface. That means you can choose not to use macros at all, too.
Although I assume you have some experience with Word and the user interface, I do not assume any programming experience. If you want to get the most from using VBA, you should read and understand the first two chapters before reading other chapters. They explain basic automation principles and creating and modifying macros. The remaining chapters may be read in any order.
  • Chapter 2: Introduces the basics of automation – when to use it and when not to – and discusses automation project management.
  • Chapter 3: Covers recording and modifying macros from the Word code generator. Word can record and playback a series of user actions in procedures called macros. Recorded macros can be modified, or new macros can be created by hand. The chapter discusses each of these techniques, which will be used throughout the rest of the book.
  • Chapter 4: Covers Find and Replace. This is a versatile utility that goes well beyond simply finding and replacing text. You can set up powerful replacements that can convert the messiest of Word HTML into clean XHTML code. It also provides a powerful search language that uses wildcards, to find patterns of text, such as telephone numbers or part numbers.
  • Chapter 5: Covers fields and form fields. Fields are automatically updating containers of text. Most readers know that page numbers, like β€œPage 1 of 10”, are fields, but you may not know that you can craft your own fields to perform a wide range of calculations. Word tables can be used as small Excel-like spreadsheets, incorporating many of the same functions. Combined with other features, including bookmarks and macros, an impressive amount of information can be created, collected, or shared with minimal effort.
  • Chapter 6: Covers the automatic placement or insertion of information. These features include AutoCorrect, which automatically fixes spelling errors – for example, switching teh for the – and an expanded feature in Office 2007, Building Blocks, which allows you to insert any amount of material – from a client's name to an entire document template complete with formatting and styling – into a Word document.
  • Chapter 7: Covers Smart Tags, a capability that automatically highlights predefined terms or patterns in the text, such as names, acronyms, or addresses, with a purple underline like the underline used to flag misspelled words. Clicking on a highlighted term presents additional actions for that term, such as ...

Table of contents

  1. The Secret Life of Word