Ok, im having problems with the ActiveDocuments in the following code, and its my first time using word, any pointers where im going wrong, im sure its something simple, but just cant get there????
do i need to declare the ActiveDocument or a DoEvents??
thanks
.....
VB Code:
'open word Dim Obj As Object If Obj Is Nothing Then Set Obj = CreateObject("Word.Application") Else Set Obj = GetObject(, "Word.Application") End If Set Worddoc = Obj.Documents.Add Obj.Visible = True 'set up table 'error 424 object requred in the following 2 lines ActiveDocument.PageSetup.Orientation = wdOrientLandscape ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:=10 'insert headings Obj.Selection.typeText Text:=Text1(0).Text & vbCr




Reply With Quote