Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2015, 10:15 AM
paik1002 paik1002 is offline How to detect which object has been selected Windows 7 64bit How to detect which object has been selected Office 2010 64bit
Advanced Beginner
How to detect which object has been selected
 
Join Date: Dec 2015
Posts: 63
paik1002 is on a distinguished road
Default How to detect which object has been selected

I'd like to detect(1,2,3) if the selection is one of the following objects:


1. image (inlineshapes)
2. figure (circle)
3. text

I am thinking in the line of(pseudo-code):
if selection is an image type, then do something...
else if selection is a figure type (circle), then do something...
else if selection is text, then do something...
else show msgbox alerting none of the above was selected

Can it be done?
Reply With Quote
  #2  
Old 12-12-2015, 05:41 PM
macropod's Avatar
macropod macropod is offline How to detect which object has been selected Windows 7 64bit How to detect which object has been selected Office 2010 32bit
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

The Selection.Type property returns one of 9 values:
0 No selection.
1 An inline paragraph selection.
2 A normal or user-defined selection.
3 A frame selection.
4 A column selection.
5 A row selection.
6 A block selection.
7 An inline shape selection.
8 A shape selection
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Detect Category Change ScottA Excel 3 05-07-2014 05:48 AM
Detect in VBA if document has been changed nsv Word VBA 4 04-28-2014 05:58 AM
Detect a cell has un-approved change or not? LongTTH Excel Programming 1 05-20-2012 02:22 AM
auto-detect display options? davidt76 PowerPoint 0 09-30-2011 07:26 AM
How to detect which object has been selected Is there a way to detect duplicate dates as I enter them? Karin Excel 1 03-04-2011 12:56 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:24 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