Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 11-26-2019, 11:01 PM
Guessed's Avatar
Guessed Guessed is offline Top row of table not selecting in code Windows 10 Top row of table not selecting in code Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

You can reset the paragraph format to bring it back to left aligned
aRow.Range.Style = "Caption"
aRow.Range.ParagraphFormat.Reset

I think your table style (which has defined the paragraphs as centred) is causing the problem you are seeing. I generally try to avoid over-specifying the table styles because they can then override the paragraph styles that I use. Table styles are somewhat problematic because once you have included an 'optional' attribute like font or paragraph format settings, it can be very hard to remove it but easy to reassign.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Top row of table not selecting in code Code to find a named (bookmarked?) table, replicate a row or table, and delete a specified table. kevinbradley57 Word VBA 9 09-21-2017 04:58 PM
Top row of table not selecting in code Problem with table grid when selecting status in ribbon lodi123 Word VBA 1 02-24-2017 05:32 AM
Selecting a digit from a code Warren99 Excel 2 05-29-2016 04:08 AM
Top row of table not selecting in code Selecting table cell vs. text dionnaro Word Tables 1 05-24-2016 04:04 PM
Selecting/deselecting items in pivot table mbesspiata Excel 0 07-22-2014 08:15 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:55 AM.


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