J
Joe
I am running Word 2003 on Windows 2000 and am finding that the following code crashes on a specific line when this code is executed more than one and the previously created Word doc is still closed. In other words, I can run this time after time if I always leave the newly created documents open. If I close them, the code bombs on the line
With .Selection
.Font.Bold = True
.TypeText "Storage Requirements"
.Font.Bold = False
.TypeParagraph
' Create table to hold workstations
.Tables.Add Range:=.Range, NumRows:=4, NumColumns:=5
iLastTable = .Tables.Count
************** Code bombs on this line ***********************
.Tables(LastTable).Columns(1).SetWidth InchesToPoints(1), wdAdjustNone
Is there something about the SetWidth method that I need to know?
Any help is greatly appreciated.
Thank you,
Joe
With .Selection
.Font.Bold = True
.TypeText "Storage Requirements"
.Font.Bold = False
.TypeParagraph
' Create table to hold workstations
.Tables.Add Range:=.Range, NumRows:=4, NumColumns:=5
iLastTable = .Tables.Count
************** Code bombs on this line ***********************
.Tables(LastTable).Columns(1).SetWidth InchesToPoints(1), wdAdjustNone
Is there something about the SetWidth method that I need to know?
Any help is greatly appreciated.
Thank you,
Joe