T
Thane Walkup
This macro originally was in the Document_Open function, and the document
would never open on Word XP, which would stop responding pretty much forever
(let it run for 1/2 hour on P4 2.8ghz w/512mb RAM).
Any ideas?
Thanks,
Thane
---Start code---
Sub test()
ActiveDocument.Tables(1).Borders.Enable = True ' Enabled for testing
purposes
If ActiveDocument.Tables.Count >= 1 Then
If ActiveDocument.Tables(1).Borders.Enable = True Then
For i = 1 To ActiveDocument.Tables.Count
With ActiveDocument
.Tables(i).Borders.Enable = False
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).AutoFitBehavior wdAutoFitWindow
End With
Next i
End If
End If
End Sub
---end code---
would never open on Word XP, which would stop responding pretty much forever
(let it run for 1/2 hour on P4 2.8ghz w/512mb RAM).
Any ideas?
Thanks,
Thane
---Start code---
Sub test()
ActiveDocument.Tables(1).Borders.Enable = True ' Enabled for testing
purposes
If ActiveDocument.Tables.Count >= 1 Then
If ActiveDocument.Tables(1).Borders.Enable = True Then
For i = 1 To ActiveDocument.Tables.Count
With ActiveDocument
.Tables(i).Borders.Enable = False
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).Range.InsertBreak Type:=wdColumnBreak
.Tables(i).AutoFitBehavior wdAutoFitWindow
End With
Next i
End If
End If
End Sub
---end code---