#1
|
|||
|
|||
Setting cursor after last Table of Contents
I'm building a macro to auto-format our requirements documents and one of my tasks is to place a Table of Figures right after the Table of Contents. Theoretically, this is an easy task, just invoking ActiveDocument.TableOfFigures.Add when the cursor is in the right place. The problem I'm finding is putting it in the right place. Usually, I'll location an object, select it, and then move down, but the Table of Contents object does not seem to have a Select method. Any advice?
This is in Microsoft Word 2007 using VBA for the macro. |
#2
|
|||
|
|||
Ah, figured it out. If one does .Range.Select on a TableOfContents object, and then does Selection.MoveDown, you get the line right below the Table Of Contents.
|
Tags |
macro, table of figures, word 2007 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
cursor jumps to top when scrolling past table | angharad09@gmail.com | Word | 0 | 07-30-2011 02:42 PM |
Table of Contents - with a twist | NuggetSoftware | Word | 3 | 06-03-2011 02:51 PM |
Table of contents | markos97 | Word | 0 | 10-26-2010 08:52 AM |
Paste contents skiping from cursor pos . | aligahk06 | Word | 0 | 10-20-2009 05:53 AM |
Table of Contents Formatting | Rick5150 | Word | 1 | 03-16-2009 11:10 AM |