Solved

moving tabs in header and footer word vba

Posted on 2010-09-22
2
447 Views
Last Modified: 2012-05-10
I have a document that has multiple sections and each section has a header and footer that is independent. I have a macro that resizes the document to A4 (upon request). This resizes the margins, location of the header and footer and the page size. However, the headers and footers have a right-aligned tab in them, and that tab does not get reset.

I need help automating the resetting of the tabs. I am not aware of a parameter within pagesetup that would move the tabs. I have tried recording a macro to do the work but that hasn't done the trick either. On a simple sample document it works fine but with my document (which has bookmarks and center tabs and field codes as well) it doesn't (even though that is where I recorded  the macros). Is there something I am missing?
0
Comment
Question by:karimjohnson
2 Comments
 
LVL 3

Accepted Solution

by:
DEVLitehouse earned 500 total points
ID: 33739962
You can get to the TabStops is a member of the Paragraph, ParagraphFormat and Paragraphs classes. As an example, if you want to clear ALL tabstops in a document, you could do this:

Me.Paragraphs.TabStops.ClearAll

I hope this helps you get your exact functionality.  :)
0
 

Author Closing Comment

by:karimjohnson
ID: 33740458
thanks for the advice. I ended up using bookmarks in each section to move between them, then set specific rules for header/footer changes for each section. That worked perfectly.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now