Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-28-2012, 12:39 PM
Jennifer Murphy's Avatar
Jennifer Murphy Jennifer Murphy is offline How to select the first row of the current table Windows XP How to select the first row of the current table Office 2007
Competent Performer
How to select the first row of the current table
 
Join Date: Aug 2011
Location: Silicon Valley
Posts: 234
Jennifer Murphy is on a distinguished road
Default How to select the first row of the current table

I am trying to write a macro to change some table settings. It's sorta working, but I could use a little help.

1. I can't figure out how to select the first row of the current table so I can set the font and flag it as a header row.



As I understand it, this code selects the second row in the first table of a document:
Code:
ActiveDocument.Tables(1).Rows(2).Select
Can I then use this code to select the first row in the table where the cursor is?
Code:
Selection.Tables(1).Rows(1).Select
I am also using this code to ensure that the cursor is actually in a table.
Code:
If Selection.Information(wdWithInTable) <> True Then
  MsgBox "The cursor is not in a table", , "MyTableSettings macro"
  Exit Sub
End If
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to select the first row of the current table How to call current PC date and/or current PC year KIM SOLIS Excel 2 11-04-2011 06:09 PM
How to select the first row of the current table Select Text in Table but Table Gets Selected Too RBusiness Word 1 06-07-2011 04:26 PM
How to select the first row of the current table Access to the property of the current table b0x4it Word VBA 2 05-26-2011 06:25 AM
Table - Check Boxes - Create Select All lajohn1963 Word Tables 2 09-25-2010 11:18 AM
How to select the first row of the current table Auto insert current month's name and current year Styler001 Word 4 01-25-2010 06:40 PM

Other Forums: Access Forums

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