Solved

moving tabs in header and footer word vba

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
data recovery from possible virus 9 87
Error during copy and paste 3 85
Word 2013/2016 Saving as Temp File 9 44
Delete inline shapes featuring a specific width using VBA 13 44
Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
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:
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.

920 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

15 Experts available now in Live!

Get 1:1 Help Now