Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-21-2021, 08:59 AM
Dave Gaines Dave Gaines is offline How to tell if Range is within a Frame Windows 10 How to tell if Range is within a Frame Office 2019
Novice
How to tell if Range is within a Frame
 
Join Date: Feb 2020
Posts: 5
Dave Gaines is on a distinguished road
Default How to tell if Range is within a Frame


Hi all,

I'm stepping through my document paragraph by paragraph, performing certain actions depending on its contents, position, etc. I need to know whether the paragraph in question is with a frame (not a textbox, but a frame that is created using Insert Frame). So far, have come up short. Best I can cypher right now is to expand the Range by a couple lines in each direction, and then to see if the new range contains a frame using opara.Range.frames.Count.

Does anyone else have suggestions on how to tell if a range is within a frame?

Thx in advance
Reply With Quote
  #2  
Old 03-21-2021, 09:36 AM
Dave Gaines Dave Gaines is offline How to tell if Range is within a Frame Windows 10 How to tell if Range is within a Frame Office 2019
Novice
How to tell if Range is within a Frame
 
Join Date: Feb 2020
Posts: 5
Dave Gaines is on a distinguished road
Default

Please disregard, think I answered it myself. Upon further investigation, looks like oPara.Range.Frames.Count returns "1" if range is within a frame.
Reply With Quote
  #3  
Old 03-21-2021, 02:22 PM
macropod's Avatar
macropod macropod is online now How to tell if Range is within a Frame Windows 10 How to tell if Range is within a Frame Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

Cross-posted at: MS Word VBA how to tell if Range is within a Frame - Stack Overflow
For cross-posting etiquette, please read: Excelguru Help Site - A message to forum cross posters
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant sort margins in frame page frame documents Zakko Word 10 04-05-2019 06:37 PM
Distribute text in one cell across a range of cells (overcoming selection.range.cells.count bug) slaycock Word VBA 0 02-18-2017 07:00 AM
How to tell if Range is within a Frame Find if Date range falls within another range Triadragon Excel 3 05-02-2016 11:48 AM
How to tell if Range is within a Frame Name a Range in a Word Document and then copy that range to the end of the doc w button click DanNatCorning Word VBA 1 04-29-2016 10:47 PM
How to tell if Range is within a Frame Trouble fomatting a frame - top of letter cut off in frame - line spacing gandalf458 Word 4 12-10-2014 03:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:46 PM.


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