Here is the script:
Set wrdApp = CreateObject ("Word.Application") wrdApp.documents.add (xtempDrive$+"mydoc.doc") wrdApp.Visible = True ' Add a new document Set wrddoc = wrdapp.Application.ActiveDocument Set wrdSelection = wrdApp.Selection Set range = wrdSelection.range Set tables = wrdApp.Selection.tables.add (range, 1,7) Dim wdAdjustProportional As Integer Dim wdAdjustNone As Integer Dim wdAdjustFirstColumn As Integer wdAdjustProportional = 1 wdAdjustNone = 0 wdAdjustFirstColumn = 2 wrdDoc.Tables(1).Columns(1). SetWidth 1.18, wdAdjustProportional wrdDoc.Tables(1).Columns(2). SetWidth 0.02, wdAdjustProportional wrdDoc.Tables(1).Columns(3). SetWidth 2.5, wdAdjustProportional wrdDoc.Tables(1).Columns(4). SetWidth "0,02", wdAdjustProportional wrdDoc.Tables(1).Columns(5). SetWidth "1,3", wdAdjustProportional wrdDoc.Tables(1).Columns(6). SetWidth "0,02", wdAdjustProportional wrdDoc.Tables(1).Columns(7). SetWidth "1,12", wdAdjustProportional wrdDoc.Tables(1).Rows.Alignment 1 ' wrdDoc.Tables(1).Rows.SetLeftIndent -21.6
But LotusScript gives me this error, "Value out of range" when it hits the first "wrdDoc.Tables(x).Columns(x).SetWidth "xxxx", wdAdjustProportional."
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
Which is incorrect? Thank you very much.
I would also check the Microsoft sites and forums.
Do you have comments on this Ask the Expert question and response? Let us know.
Dig Deeper on LotusScript
Related Q&A from Brian Mahoney
Find out what types of calculations can be computed for a column in a Lotus Notes view and the best way to go about it with this expert response.continue reading
Find out why you can't use Formula language to include a doclink to a specific Lotus Notes view or database and need to use LotusScript instead.continue reading
Discover the reasons behind a Notes/Domino admistrator having trouble with disabled options in the "customize this view" section of his Lotus Notes ...continue reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.