Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 12-05-2022, 04:10 PM
macropod's Avatar
macropod macropod is offline Macro is manipulating item in wrong section even though variable watch says it should be right Windows 10 Macro is manipulating item in wrong section even though variable watch says it should be right Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Guessed View Post
In my experience with floating shapes in the headers, VBA seems to think all the shapes are in every section even though the user interface shows a graphic only in one sections header. This can be further complicated when some headers may have 'Link to Previous' turned on.

So I have no faith at all in being able to use VBA to determine which shape you are referring to via the section number.
To do that, you need to get the header index and check backwards through that Section and each preceding Section to determine where the .LinkToPrevious attribute (if applied to the current Section) ends. That Section is the one in which the shape actually exists.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Footnote numbering wrong after section break peterbav Word 1 03-17-2020 11:18 PM
Macro is manipulating item in wrong section even though variable watch says it should be right How do I make a checkbox or dropdown item reference data in that specific section of the data array? dhare Excel Programming 2 02-24-2016 12:36 PM
Macro is manipulating item in wrong section even though variable watch says it should be right Copying data related to one item to worksheet with many instances of the same item nmp13 Excel 3 02-06-2016 02:13 AM
Multilevel Numbering wrong after Section Break Kay Wood Word 2 01-16-2013 08:44 AM
Help with VBA macro - Variable input sc30317 Excel Programming 0 08-31-2011 01:00 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:14 PM.


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