Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-26-2011, 01:19 AM
b0x4it b0x4it is offline Access to the property of the current table Windows 7 32bit Access to the property of the current table Office 2010 32bit
Advanced Beginner
Access to the property of the current table
 
Join Date: May 2011
Posts: 95
b0x4it is on a distinguished road
Default Access to the property of the current table

Using the selection, it can be found that whether the selection is in a table or not using :

if Selection.Information(wdWithInTable)



but what if there is no selection. How can I get access to the property of a table (for example) that the cursor is now located in one of its cells? With property I mean to define a range that has that special table.

If the table is know then it is easy using:

Selection.Tables(1). ...

but what if we do not know the number of the table?

thanks
Reply With Quote
  #2  
Old 05-26-2011, 02:48 AM
macropod's Avatar
macropod macropod is offline Access to the property of the current table Windows 7 32bit Access to the property of the current table Office 2007
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,505
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

Hi b0x4it,

There cannot be 'no selection'. And, if the insertion point is in a table, then the current table is found via Selection.Tables(1). Likewise if the selection spans a table - the first table in the selected range is found via Selection.Tables(1).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-26-2011, 06:25 AM
b0x4it b0x4it is offline Access to the property of the current table Windows 7 32bit Access to the property of the current table Office 2010 32bit
Advanced Beginner
Access to the property of the current table
 
Join Date: May 2011
Posts: 95
b0x4it is on a distinguished road
Default

Thank you so much!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to the property of the current table Auto insert current month's name and current year Styler001 Word 4 01-25-2010 06:40 PM
Access 2007 Upgrade After Initial Install - Access 2003 Won't Remove wcb Office 1 01-25-2010 04:08 AM
set icon for user property nav1982 Outlook 0 11-11-2009 05:40 AM
Want to search for "class", replacing with document property YetAnotherAuthor Word 0 10-30-2009 09:43 AM
Can I fill in Word document from Access table and/or query? slim_jim_56 Word Tables 0 10-03-2007 01:59 PM

Other Forums: Access Forums

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


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