Solved

moving tabs in header and footer word vba

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
I'm writing to share my clumsy experience in using this elegant tool so you can avoid every stupid mistake I made. (I leave it to the authorities to decide if this deserves a place in the Knowledge archives.)  Now that I am on the other side of my l…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
This video walks the viewer through the process of creating a watermark for their document, customizing it, and saving it for viewing/printing needs.

813 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

10 Experts available now in Live!

Get 1:1 Help Now