Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
resizing and delteting tables in word 2003
#1
1 I want to select all the tables in a document and autofit the lot to the window

2 I want to delete all empty tables and close up the doc by using a macro to auto backspace 3 times and then 1 delete keystroke

the code wood have to check for empty tables obviously

this shuld be easy peasy but I cannot find the right code for finding tables in the search function
#2
Code:
Copy      Help
typelib Word {00020905-0000-0000-C000-000000000046} 8.3
Word.Application app._getactive
Word.Document doc=app.ActiveDocument
Word.Table table

foreach table doc.Tables
,if(table.range.ComputeStatistics(Word.wdStatisticCharacters)=0)
,,table.Delete
,else
,,table.AutoFitBehavior(Word.wdAutoFitWindow)


Forum Jump:


Users browsing this thread: 1 Guest(s)