Introduction
- How to Use the Macros in this Book
- An Important Note about Word Versions
- Want to Learn More about Macros?
- Want to Learn about Excel Macros?
- Get More Tips
- A Special Note of Thanks
- Sharing this Document
Creating and Managing Macros
- Displaying the Developer Tab
- Recording a Macro
- Writing a Macro from Scratch
- Continuing Macro Lines
- Turning Off Screen Updating
- Debugging a Macro
- Renaming a Macro
- Changing a Macro Description
- Deleting a Macro
- Understanding the Organizer
- Using the Organizer to Manage Macros
- Clean Up Your Macro List
- Hiding Macros
- Invisible Macros
- Protecting Macros in a Corporate Environment
- Making Macros Readily Available
- Making Macros Available without Using the Normal Template
- Making Macros Run Faster
- Making Macros Run Faster, Take Two
- Adding a Macro to a Toolbar
- Adding a Macro to the Quick Access Toolbar
- Unchanging Toolbars
- Changing Toolbar Buttons
- Changing ToolTips for a Macro Button
- Locking the Position of Custom Toolbars
- Macros On the Quick Access Toolbar
- Putting a Macro Name on the Quick Access Toolbar
- Adding Your Own Menu Items
- Intelligible Names for Macros
- Defining a Shortcut for a Macro
- Removing a Macro from a Shortcut Key
- Assigning a Macro to a Button in Your Text
- Repeating In a Macro
- Editing Word's Built-in Commands
- Creating a Command List
- Running Macros from Macros
- Using Call to Run VBA Macros
- Disabled Macros
- Macro Error when Closing Document
- Passwords for Creating Macros
- Can't Edit Macros
- Can't Save a Macro
- Attaching Macros to Documents
Functions and Subroutines
- Understanding Subroutines
- Understanding Functions
- Passing Parameters to Functions
Structures Used in Macros
- Understanding the If ... End If Structure
- Understanding the For ... Next Structure
- Exiting a For ... Next Loop Early
- Understanding the While...Wend Structure
- Understanding the Select Case Structure
Working with Variables
- Understanding Variables
- Declaring Variables
- Understanding Precedence
- Setting a Variable from a Bookmark
- Swapping Two Numbers
- Swapping Two Strings
- Comparing Strings
- Dissecting a String
- Converting Strings to Numbers
- Converting Numbers to Strings
- Determining the Upper Bounds of an Array
- Quickly Clearing Array Contents
- Understanding Document Variables
Commands and Statements
- Creating a String
- Determining the Length of a String
- Trimming Spaces from Strings
- Determining an Integer Value
- Determining a Random Value
- Determining an ANSI Value
- Deriving an Absolute Value
- Calculating a Future Date
- Determining Differences between Dates
- Determining the Month of the Year
- Determining the Week of the Year
- Determining the Day of the Year
- Determining the Day of the Month
- Determining the Hour of the Day
- Determining If a File Exists
- Determining the Size of a File
- Converting Inches to Points
- Repaginating in a Macro
- Controlling Repagination in Macros
- Checking for a Text Selection Length
Changing Information In a Document
- Creating a New Document
- Inserting Text with a Macro
- Replacing Text in a Macro
- Macro Won't Limit Replacements to a Selection
- Plain Text Pasting as the Default
- Inserting a Paragraph from within a Macro
- Inserting a Break with a Macro
- Automatic Blank Pages at the End of a Section
- Selecting an Entire Section
- Cleaning Up Text in a Macro
- Removing Extra Paragraph Marks
- Adding Hyphens to Phrases
- Inserting Dashes between Letters in Words
- Using an En Dash, by Default
- Finding Long Sentences
- Dealing with Run-On Sentences
- Deleting a Page
- Copying a Range of Pages in a Macro
- Automatically Inserting Brackets
- Transposing Two Paragraphs
- Transposing Two Words
- Transposing Two Characters
- Transposing Letters
- Adding Quotes
- Adding Smart Quotes through Macro Text
- Smart Quote after Em Dash Faces Wrong Direction
- Checking for Missing Quotation Marks
- Adding Parentheses
- Adding Serial Commas in a Sentence
- Replacing the Last Comma
- Removing Tabs Used to Indent a Paragraph
- Deleting All Tab Stops
- Replacing Random Text with Your Own Text
- Determining if a Text Selection Exists
- Calculated Dates
- Monday's Date on Friday's Report
- Adding Automatic Time Stamps
- Converting Lists to Text
- Converting Automatic Numbering to Manual Numbering
- Automatically Formatting an ASCII File
- Reversing a String
- Occurrences of a Text String within a Document
- Counting the Instances of a Text String
- Consistent Spacing
- Specific Capitalization
- Capitalizing the First Letter after a Colon
- Capitalizing the First Letter after a Quote Mark
- Capitalizing the Word "I"
- Converting Text to Uppercase in a Macro
- Changing Text Case Many Times
- Making Managerial Titles Lowercase
- Intelligent Title Case
- Make AutoCorrect Pay Attention to Character Case
- Accessing Paragraphs in a Macro
- Reversing All the Paragraphs in a Document
- Shortcut Key to Delete a Paragraph
- Pasting Clean Text
- Preventing the Insertion of Non-Breaking Spaces
- Copying and Pasting Field Codes
- Deleting All Fields
- Shortcut to Display Bookmarks
- Removing All Bookmarks
- Random OLE Bookmarks
- Copying Custom Properties
- Changing Lots of Title Properties
- Removing All File Properties
- Adding a Full-Width Line in a Macro
- Changing Information in Multiple Documents
- Processing Information Pasted from a PDF File
- Automatic Sound Clips
Changing Location and Finding Information
- Moving the Insertion Point in a Macro
- Moving the Insertion Point to the Beginning of a Line
- Moving the Insertion Point to the End of a Line
- Jumping to the End of a Word
- Detecting the Beginning of a Sentence in a Macro
- Determining the Horizontal Position of the Insertion Point
- Jumping to the Start or End of a Document
- Moving to the Start or End of the Real Document
- Jumping to the Top of a Page
- Jumping to the End without Repaginating
- Quickly Changing Document Windows
- Positioning the Cursor in a New Document
- Searching for Adjectives and Adverbs
- Checking for Words and Phrases
- Removing Duplicates in Word
- Setting a Default for the Object Browser
- Searching for Borders
- Finding Text Not Using a Particular Font
- Finding a Change in Typeface
- Searching for Non-Black Text
- Finding Text Using a Specific Highlighting Color
- Finding Quoted Text in VBA
- Highlighting Buried Verbs
- Searching for Items in an Automatically Numbered List
- Locating Locked Fields
- Finding Changes, by Editor
- Select All Changes by a Particular Reviewer
- Finding Punctuation-Free Paragraphs
- Saving Search and Replace Information in a Macro
- Returning to Where You Were Before Finding Something
Changing Document Formatting
- Setting the Left Indent of a Paragraph in a Macro
- Setting the Right Indent of a Paragraph in a Macro
- Double Indenting
- Quickly Adjusting Paragraph Spacing
- Aligning Paragraphs in a Macro
- Getting Rid of Choppiness in Justified Text
- Reversing Type
- Using a Macro to Change the Formatting of All Instances of a Word
- Selective Formatting in Replacements
- Automatically Formatting Text within Quotes
- Replacing Quoted Text with Italics
- Underlining Quoted Text
- Making a List of Words Italic
- Adjusting Space Before
- Determining the Number of Fonts Available
- Creating a Document Font List
- Toggling Font Assignments in a Macro
- Controlling the Italic Text Attribute
- Controlling the Bold Text Attribute
- Applying Bold Italics
- Reversed Bolding
- Changing Character Color
- Shortcuts to Change Text Colors
- Changing the Color of a List of Words
- Changing All Text of a Particular Color
- Discovering the RGB Value of a Custom Text Color
- Adjusting Small Caps Text
- Controlling the Hidden Text Attribute
- Resetting Paragraph Formatting
- Getting Rid of Manual Paragraph Numbering
- Overlining Characters
- X-ing Out Text
- Removing Shading from Many Paragraphs
- Making Highlighting Disappear when Typing
- Highlighting Every Other Line
- Highlighting Every Thousandth Character
- Changing the Format of Existing Dates
- Turning Off Default First Page Numbering
- Making Bookmarks Bold
- Formatting Fractions
- Single-Character Fractions
- Reducing the Size of Spaces in a Selection
- Replacing the Space between the Last Two Words of Each Paragraph
- Controlling the Format of Cross-References
- Resetting Character Formatting in a Macro
- Finding Formatted Bulleted Paragraphs
- Quickly Formatting Multiple Documents
- Formatting Text Files
- Rotating a Page of Text
- Setting a Precise Custom Paper Size
- Using the Format Painter with Editing Restrictions in Place
- Remembering a Custom Color
Working with Styles and Templates
- Keeping the Styles Pane Open by Default
- Determining a Paragraph's Style
- Determining How Many Styles are Available
- Finding In-Use Styles in a Macro
- Finding Unused Styles
- Removing Unused Styles
- Printing a List of Custom Styles
- Variant Style Names Appearing
- Saving Styles in a Macro
- Copying Styles
- Moving All Headings Down One Level
- Replacing the Style of a Paragraph that Follows a Heading
- Preventing Styles from Changing
- Making Sure Styles Don't Update Automatically
- Changing the Names of Multiple Styles
- Ensuring that Spell Checking is Enabled in All Styles
- Macro-Inserted AutoText Doesn't Set Style
- Editing AutoText Entries Directly
- Create a Template that Stops Styles from Being Added to a Document
- Listing the Settings in a Template
- Examining Styles and Macros in a Template
- Batch Template Changes
- Putting Template Macros in a Document
- Continually Saving Normal.dot
- Protecting Macros in the Normal Template
- Templates and Page Setup
- Updating Many Template References
- Passing Custom Caption Labels from a Template to a Document Based on the Template
- Disappearing Macro Menus
Working with Headers and Footers
- Including Headers and Footers when Selecting All
- Pulling Headers and Footers from Other Files
- Applying Standard Headers and Footers to a Document
- Quickly Formatting Footers in Documents with Many Sections
- Deleting All Headers and Footers
- Inserting a Document's Path
- Using a Portion of a Document's Filename in a Header
- Dynamic Path and Filename in a Footer
- Missing Header and Footer Toolbar
- Moving Headings to the Next Page
- Placing the First Two Words from the Following Page In the Footer
- Changing Roman Numerals to Arabic
- Word Count for Headers and Footers
- Field in Footer Won't Update
- Changing the Link to Previous Default for Headers and Footers
- Turning Off "Link to Previous" by Default
Working with Footnotes and Endnotes
- Automatically Adding Tabs in Footnotes
- Sequentially Numbering Footnotes
- Moving Text to a New Footnote
- Moving Footnote Text into the Document
- Converting Hyperlinks to Footnotes
- Getting Rid of Hyperlinks in Footnotes
- Combining Footnotes
- Accessing a Footnote Number in VBA
- Deleting All Footnotes
- Getting Rid of Trailing Spaces in Footnotes and Endnotes
- Formatting Footnote and Endnote References
- Changing Endnote Numbering Style
- Returning to Your Document after Adding an Endnote
- Reference to a Range of Endnotes
Working with Tables
- Adding Multiple Rows to a Table
- Filling Table Cells with a Macro
- Removing Leading Spaces in a Table
- Putting Something in Every Cell of a Table
- Placing Text in Empty Table Cells
- Filling Table Cells with Sequential Numbers
- Setting Table Values to Three Decimal Places
- Setting Decimal Tabs in a Table Using the Keyboard
- Finding a Cell Reference
- Fitting Text Into Cells
- Differing Column Widths when Pasting
- Adjusting Column Width from the Keyboard
- Setting Consistent Column Widths in Multiple Tables
- Setting a Standard Column Width
- Stopping Row Breaking for Many Tables
- Expanding Width of All Tables
- Moving Through a Table in a Macro
- Jumping to a Table Row
- Tabbing from One Table to the Next
- Noting Table Rows Containing a Character
- Index Number for the Active Table
- Setting a Default Table Border Width
- Copying Fill Color in a Table
- Easily Copying Cell Formatting
- Getting Rid of Background Color in All Tables
- Printing Only Selected Rows from a Table
- Copying All Tables to a New Document
- Converting Tables to Text
- Preventing a Frame when Converting a Table to Text
- Formatting an ASCII Table with Spaces
- Formatting an ASCII Table with Tabs
- Applying Consistent Shading to a Table
- Shading Table Rows
- Finding and Deleting Rows
- Table Borders not Stored in AutoText
- Nudging a Table
- Updating an Entire TOC from a Macro
- Hyperlinks from Headings to the TOC
- Jumping Back to the TOC
Working with Graphics and Text Boxes
- How to Paste Non-Floating Pictures with a Macro
- Searching for Floating Graphics
- Default Picture Settings
- Anchoring Objects by Default
- Scaling Graphics in a Macro
- Determining Picture Size
- Counting All Graphics
- Rotate a Graphic Using the Keyboard
- Inserting an Image On a Specific Page
- Inserting Multiple Graphics in a Document
- Replacing an Image Filename with the Actual Image
- Finding and Removing Stubborn Graphics
- Removing Pictures from Multiple Files
- Extracting INCLUDEPICTURE File Names
- Printing Images Based on Hidden Text Setting
- Finding Text Boxes
- Finding and Replacing Text Boxes
- Finding an Invisible Text Box
- Centering a Text Box
- Turning Off Overlapping, by Default
- Updating a Field in a Text Box
- Characters in the Margin Next to Paragraphs
- Removing Text Boxes but Saving the Text
- Removing All Text Boxes In a Document
- Counting Characters in Text Boxes
- Including Text Box Text In Word Counts
Working with Comments
- Converting Paragraphs to Comments
- Converting Text to Comments
- Sorting Comments by Date
- Inserting Initials and Date in a Comment
- Changing the User Name in Existing Comments
- Changing Text in a Comment
- Getting a Change and Comment Count by Author
- Counting Words in Comments
- Deleting All Comments
- Deleting Commented Text
Working with Word's Tools
- Opening the Document Map by Default
- Importing AutoCorrect Entries
- Importing AutoCorrect Entries, Take Two
- Managing the AutoCorrect List
- Toggling AutoCorrect Settings
- Spell Checking Forms
- Limiting a Spelling Check
- Spell Checking when Closing Documents
- Enforcing a Do-Not-Use Word List
- Updating the Spelling Exclusion List Automatically
- Forcing Word to Display Spelling and Grammar Errors
- Resetting Spelling and Grammar Checking on Multiple Documents
- Compiling Misspelled Words from Documents
- Pulling Out Spelling Errors
- Avoiding the "Check Remainder" Dialog Box
- Only Showing Readability Statistics
- Display Your Own Readability Statistics
- Underlining Section References Automatically
- Auto Creation of an Acronym List
- Changing the Default Highlighting Color
- Creating Multiple Highlighter Tools
- Removing Only One Text Highlighting Color
- Tracked Changes Notification when Opening
- Making Simple Markup the Default for Track Changes
- Turning Track Changes Off for Selected Areas
- Permanently Turning Off the Tracking of Formatting Changes
- Examining Tracked Changes in a Macro
- Accepting All Deletions in a Document
- Removing the Time Stamp from Tracked Changes
- Setting Default Options for Track Changes
- Setting Change Bars Manually
- Counting Changed Words
- Word Counts for a Group of Documents
- Changing Pronoun Gender
- Finding Cross-References to Specific Bookmarks
- Adding Quoted Words to an Index
- Creating Many Index Entries at Once
- Putting Bold Words in an Index
Getting User Input
- Using Message Boxes
- Getting User Input in a Dialog Box
- Changing What Is Pasted in a Dialog Box
- Offering Options in a Macro
Working with Files and Directories
- Picking Up in the Last Document Edited
- Displaying the Document Title Right Away
- Getting Input from a Text File
- Saving Information in a Non-Document Text File
- Determining If the End of a Text File Has Been Reached
- Determining the Length of a Non-Document Text File
- Appending to a Non-Document Text File
- Renaming a File
- Using a Standard Format in a Suggested File Name
- Setting a Document Naming Convention
- Opening a Text File and Template from the Command Line
- Using Seek In a Macro
- Saving a Document in a Macro
- Saving in a Macro Using a Desired File Name
- Passing a Data File Name via Command Line to a Macro
- Saving in Document Format from a Macro
- Mirroring Documents
- Automatically Saving Document Copies on A:
- Specifying a Backup Location
- Controlling Names of Backup Files
- Combining Documents
- An Automatic File Name
- Creating Multiple Blank Documents in One Step
- Changing the Default Drive
- Creating a Directory
- Changing Directories in a Macro
- Determining the Current Directory
- Removing a Directory
- Locating the My Documents Folder
- Creating Files with Mail Merge
- Merging to Individual Files
- Saving Personalized Copies of a Document
- Importing a Text File and Inserting after a Bookmark
- Copying a File
- Deleting the Open Document File
- Finding Out the Folder for an Open Document
- Marking Multiple Documents
- Saving Documents as Read-Only by Default
- Limiting the Options when Saving as a Copy
- Modifying Behavior of the Open Dialog Box
- Breaking Links in Lots of Documents
- Converting Files to Word 2007 Format
- Converting Many DOC Files to DOCX
Interacting with the Word Environment
- Word's Object Model
- Finding and Changing Word's Internal Commands
- Grabbing the MRU List
- Minimizing the Ribbon for a Document
- Displaying Properties Dialog Box in a Macro
- Saving Everything
- Opening Documents in Print Layout View
- Viewing Side-by-Side Pages
- Keeping Documents at a Single-Page View
- The Case of the Vanished Menu Bar
- Clearing the Undo Stack in a Macro
- Changing the Maximum Undo Levels
- Button for Leaving Full-Screen Mode
- Persistent Reviewing Toolbar Display
- Suppressing the Control Toolbox Toolbar
- Changing Stubborn Ruler Measurements
- Stopping Smart Tags from Being Saved
- Displaying the Outlining Toolbar by Default
- Hiding the Reviewing Toolbar
- Displaying the File Tab of the Ribbon by Default
- Displaying the Navigation Pane when Opening a Document
- Automatically Opening a Document at a Specific Zoom Setting
- Making the Show/Hide Setting Persistent
- Determining the Number of Paragraphs in a Document
- Determining the Number of Pages in Your Document
- Determining the Current Page Number
- Limiting Directories in the FILENAME Field
- Restoring a Keyboard Shortcut
- Displaying a Message in the Status Bar
- Displaying the User Name in the Status Bar or Title Bar
- Determining if Num Lock is On
- Determining if Caps Lock is On
- Determining if Overtype Mode is Active
- Determining How Many Windows are Open
- Counting Open Document Windows
- Default Units that Change
- Turning on Large Icons in a Macro
- Problem With Add-on Macros
- Changing the View in File New
- Preventing the Loss of Personal Information
- Easily Changing Username and Initials
- Determining the Number of Bookmarks Defined in a Document
- Getting the Names of Defined Bookmarks
- Getting Bookmark Information
- Selecting a Bookmark in a Macro
- Detecting if the Insertion Point is Inside a Bookmark
- Stubborn Foreign Languages
- Changing the Language Setting for All Document Text
- Returning Word to Default Settings
- Detecting an Open Dialog Box
- Searching with a Different Search Engine
- Making the Paste Options Button Option Persistent
- Clicking to Scroll Down Freezes
- Accessing the Dirty Flag
Working with the Outside World
- Accessing a List of Outlook Contacts
- Setting Maximum Line Lengths in Word E-mail Messages
- Counting Fields in a Document
- Automatically Updating Fields and Links
- Embedding Linked Documents
- Avoiding the Update Links Message
- Counting Internal Links
- Unlinking an Excel Chart Automatically
- Word Link to Create a New Excel Workbook
- Smart Quotes with Dragon Naturally Speaking
Working with the Printer
- Including a Printer's Name in a Footer
- Changing Print Dialog Box Defaults
- Changing the Default "Print What" Setting
- Easily Changing Print Order
- Changing Focus when Starting to Print
- Temporarily Changing the Printer in a Macro
- Two Printed Copies to Different Paper Trays
- Printing and Exiting Word in a Macro
- Printing All Open Documents
- Printing via Macro without Messages
- Shortcut Key to Make Print Preview Active
- Setting the Default Print Preview Zoom Factor
- Printing Styles in a Macro
- Printing On Both Sides of the Paper
- Printing the Code for a Macro Procedure
- Printing Comments
- Printing Shortcut Key Assignments from a Macro
- Printing Summary Information from a Macro
- Printer Name on the Status Bar
- Correct Line Numbers When Printing Selections
- Automatic Page Numbers across Multiple Documents
- Printing Graphic Thumbnails
- Printing a Font List
- Printing a File List
- Printing a Macro List
- Printing a Full Style Sheet
- Printing the Active Document from a Macro
- Printing AutoCorrect Entries
- Printing a List of Building Blocks
- Printing Copy Numbers
- Remembering Copies to Print
- Printing a Bookmark List
- Printing a Bookmark List with Contents
- Printing a List of AutoCorrect Entries
- Printing without Footnotes
- Printing Personalized Copies of a Document
- Shortcut to Save as a PDF
- Working With Multiple Printers
- Specifying a Paper Tray in a Macro
- Documents Printing Out of Order
- Printing Outside the Boundaries All the Time
- Printing Color Separations with VBA
- Printing Custom Properties
- Suppressing ASK Fields When Printing
- Default Envelope Margins
- Controlling Page Numbers in Mail-Merged Documents
Special-Purpose Macros
- Automatically Running a Macro
- Bypassing the Startup Macro
- Using AutoCorrect to Start Macros
- Running Macros Based on Keywords
- Expanding Colors Available for Highlighting
- Embedding TrueType Fonts by Default
- Automating a Manual Process with a Macro
Macro Cookbook
- Numbers Spelled Out
- Numbers to Text, Take Two
- Numbers to Text, Take Three � Over a Million
- Converting Words into Numbers
- Calculating Average Word Length
- Counting Words the Old Fashioned Way
- Generating a Count of Word Occurrences
- Word Count for a Section
- Word Count for a Portion of a Document
- Generating a List of Unique Words
- Checking for a List of Phrases in a Document
- Determining Word Frequency
- Character Frequency Count
- Running Word Counts
- Displaying a Live Word Count
- Counting Lists
- Highlight Words from a Word List
- Determining If a Number is Odd or Even
- Strip Trailing Spaces
- Reverse Numbered Lists
- Sharing Headings with Others
- Selecting to the Next Punctuation Mark
- Checking for Matching Parentheses
- Breaking Lines in E-mail
- Finding an Unknown Character
- Creating a Lorem Ipsum Tool
- Talking to Yourself
- A Real AutoSave
- Saving Changes when Closing
- Creating an AutoText Reference List
- Screen Flip Flop
- Making Live URLs Into Normal Text
- Hyperlinks in Protected Documents
- Removing HTTP from URLs
- Removing HTML Tags from Text
- Changing from Absolute to Relative Hyperlinks
- Pulling All Hyperlinks
- Getting Rid of Many Hyperlinks
- Making Hyperlinks from Coded Text
- Full Path Names in Word
- Inserting a File Name without an Extension
- Selecting Sentences
- Breaking Into Sentences
- Bumping Numbers in a Document
- Using Sequential Document Serial Numbers
- Making Sure a Document Always Has an Even Number of Pages
- Automatically Inserting Tomorrow's Date
- Forcing the Date to the Next Wednesday
- Automatically Determining a Due Date
- Inserting the Time Remaining Until a Target Date and Time
- Automatic Non-breaking Spaces in Dates
- Generating a List of Dates
- Auto-incrementing Form Fields
- Zooming with the Keyboard
- Moving Right by Sentences
- Moving Found Text Down On a Page
- Copying Red Text to a New Document
- Finding Long Lines
- Protecting Fields
- Updating Fields in Locked Forms
- Updating Fields Automatically
- Updating Calculated Fields in a Form
- Copying Form Field Contents
- Using Mandatory Form Fields
- Safely Relocking Forms
- Handling Returns in Form Data
- Automatically Setting Right Leader Tabs
- Protecting Hidden Text
- Quickly Switching Languages
- Capitals After Colons
- An Automatic Two Spaces After a Period
- Tiling Documents
- Checking for a Security Certificate
- Counting Characters in a Selection
- Repeating Actions
- Putting Shift+F4 On the Quick Access Toolbar
- Problems Using Words as Bullets
- Ignoring Smart Quotes when Comparing Text
- Odd Sorting
- Sorting by Highlighting
- Displaying a Column Number
Search This Blog
Tuesday, July 5, 2022
Macros for Purchase
From https://store.tips.net/T010058_WordTips_The_Macros_Table_of_Contents.html:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment