Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-07-2011, 06:13 AM
DugganSC DugganSC is offline Setting cursor after last Table of Contents Windows XP Setting cursor after last Table of Contents Office 2007
Novice
Setting cursor after last Table of Contents
 
Join Date: Aug 2011
Posts: 8
DugganSC is on a distinguished road
Red face 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.
Reply With Quote
  #2  
Old 09-07-2011, 11:42 AM
DugganSC DugganSC is offline Setting cursor after last Table of Contents Windows XP Setting cursor after last Table of Contents Office 2007
Novice
Setting cursor after last Table of Contents
 
Join Date: Aug 2011
Posts: 8
DugganSC is on a distinguished road
Default

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.
Reply With Quote
Reply

Tags
macro, table of figures, word 2007

Thread Tools
Display Modes


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
Setting cursor after last Table of Contents 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

Other Forums: Access Forums

All times are GMT -7. The time now is 08:16 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft