Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 03-22-2021, 06:28 AM
Cendrinne's Avatar
Cendrinne Cendrinne is offline How to script most table column in word document? Windows 10 How to script most table column in word document? Office 2019
Competent Performer
How to script most table column in word document?
 
Join Date: Aug 2019
Location: Montreal Quebec Canada
Posts: 200
Cendrinne is on a distinguished road
Default

Thanks, Andrew, It's a great Start.
i've tried it, I don't know why, it gives me 5, when the most columns I had was 9.
I've created some mini tables, from 2 to 9, and still say's 5.

Well your code us much better than mine, cause I've taken parts from other macro's, and what ever I've done, but I keep getting error message. I was thinking it can't be done until your answer.

Code:
Sub TST_Msg_eCount_Tables_Columns()
'98
Dim Tbl As Table

If ActiveDocument.Tables.Count >= 1 Then
 
   'MsgBox ActiveDocument.Tables(1).Columns.Count
   'MsgBox Selection.Information(wdMaximumNumberOfColumns)
   MsgBox Information(wdMaximumNumberOfColumns)

 End If
End Sub
I'm back at work now, so I'll try maybe tonight, unless you find a reasons why it keeps saying 5. What ever I find, I'll let you know.

Thanks a million, it's a great start At least I'm going forward with your script
Reply With Quote
 

Tags
help please, most table column



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA to add final touches to merged document, after running MailMergeToDoc script NicB Word VBA 1 09-02-2020 05:47 PM
How to generate a word document with a table-script valdavaux Word 1 09-17-2017 03:32 PM
Is it possible to put a formula in a table column header to define the name of the column? JacquesW Excel 3 05-08-2017 08:00 AM
VBA to search each row of a word table column Marrick13 Word VBA 7 11-17-2014 04:33 AM
How to script most table column in word document? two column word document. plato Word 1 08-06-2010 04:02 AM

Other Forums: Access Forums

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