Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 02-16-2012, 05:38 PM
Marrick13 Marrick13 is offline VBA to insert captions without appending to existing captions Windows XP VBA to insert captions without appending to existing captions Office 2010 32bit
Competent Performer
VBA to insert captions without appending to existing captions
 
Join Date: Jun 2006
Posts: 103
Marrick13 will become famous soon enough
Default

Works great - thanks, Paul! I see you also included code to search all stories. Just what I wanted, except that when it gets to the footer (and presumably the header, if it contained an inline shape), it errors with 4605 ("This method or property is not available because the object refers to a header or footer").

Actually, I just realized that Word doesn't allow one to create captions for shapes in headers, footers, footnotes or endnotes, so I guess there's no benefit to having the code search all stories. But there are 17 stories, right? Perhaps it should have an error trap/message instead?

I'm sure I can adapt this code to do the same for tables, but shapes are different. The Intellisense for "For Each Shp In RngStry." is "shaperange", not "shapes," and "shaperange" doesn't work (when the variable is declared as a shape or shaperange). Can you advise what i need to do to make it work for shapes as well?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to insert captions without appending to existing captions Move existing table captions bcarlier Word Tables 17 05-10-2014 02:36 PM
Captions/Styles NWoffice Word 5 10-06-2011 10:26 AM
VBA to insert captions without appending to existing captions creating tables for row of figures and captions gib65 Word 2 08-12-2011 01:25 PM
VBA to insert captions without appending to existing captions Captions (tables and figures) mcjohn Word 1 02-11-2010 10:36 PM
Captions dwilliams Word 0 10-07-2009 08:30 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:18 AM.


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