J
Jimbob
I have a macro which I'd like to extract data from a sheet, copy the
resultant array to a bookmark in an open Word template and it falls over
(before it gets started) with 'Compile error: user-defined type not defined'.
Here's the relevant part:
Sheets("2.1. ").Select
Application.Goto Reference:="Totals"
Application.Run "'ET Utilities.xls'!xtractFromStd"
Selection.CurrentRegion.Select
Selection.Cut
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("I:\I:\ET\Report Template.dot")
With wrdDoc
Dim BmkNm As String
BmkNm = "S1"
End With
The crunch seems to be in wrdApp As Word.Application.
I'm sure it's very basic to you guys but any clues gratefully received by a
raw beginner.
Thanks
resultant array to a bookmark in an open Word template and it falls over
(before it gets started) with 'Compile error: user-defined type not defined'.
Here's the relevant part:
Sheets("2.1. ").Select
Application.Goto Reference:="Totals"
Application.Run "'ET Utilities.xls'!xtractFromStd"
Selection.CurrentRegion.Select
Selection.Cut
Dim wrdApp As Word.Application
Dim wrdDoc As Word.Document
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Open("I:\I:\ET\Report Template.dot")
With wrdDoc
Dim BmkNm As String
BmkNm = "S1"
End With
The crunch seems to be in wrdApp As Word.Application.
I'm sure it's very basic to you guys but any clues gratefully received by a
raw beginner.
Thanks