Solved

moving tabs in header and footer word vba

Posted on 2010-09-22
2
453 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

726 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