B
Barry-W
Hi, I have read, and used, the information in the Control Excel fro Word
article, and I have got my system to partially work (i.e. I can write to
excel from a Word Macro)
What I am now struggling with is inserting rows in the Excel Spreadsheet
from the Word Macro, here is the relevant portion of the code:
'Open the workbook
Set oWB = oXL.Workbooks.Open(FileName:=WorkbookToWorkOn)
'Select the Sheet
Set oSheet = oWB.Sheets(SheetToWorkOn)
oSheet.Range("C12") = "test" 'To prove I can access the worksheet!
oSheet.Rows("3:3").Select
Selection.Insert Shift:=xlDown ' "Compile Error Method or Data member
not found"
'oSheets.Insert Shift:=xlDown 'doesn't work either
'oSheets.Selection.Insert Shift:=xlDown 'Nor does this,
Could some one point out the errors of my ways please?
Barry
article, and I have got my system to partially work (i.e. I can write to
excel from a Word Macro)
What I am now struggling with is inserting rows in the Excel Spreadsheet
from the Word Macro, here is the relevant portion of the code:
'Open the workbook
Set oWB = oXL.Workbooks.Open(FileName:=WorkbookToWorkOn)
'Select the Sheet
Set oSheet = oWB.Sheets(SheetToWorkOn)
oSheet.Range("C12") = "test" 'To prove I can access the worksheet!
oSheet.Rows("3:3").Select
Selection.Insert Shift:=xlDown ' "Compile Error Method or Data member
not found"
'oSheets.Insert Shift:=xlDown 'doesn't work either
'oSheets.Selection.Insert Shift:=xlDown 'Nor does this,
Could some one point out the errors of my ways please?
Barry