Yes. You will need to use the Word object model. Office is not supported
in an unattended Server side implementation.
This works in Office 2K
Function Main()
Dim wrdApp
Dim wrdDoc
dim WHOLEDOCUMENT
set wrdApp = CREATEOBJECT("Word.Application")
Set wrdDoc =
wrdApp.Documents.Open(DTSGlobalVariables("gv_FileT oPrint").Value)
WHOLEDOCUMENT = 0
wrdDoc.PrintOut , ,WHOLEDOCUMENT, , , , ,
Cint(DTSGlobalVariables("gv_Copies").Value)
wrdDoc.Close
Set wrdDoc = Nothing
set wrdApp = nothing
Main = DTSTaskExecResult_Success
End Function
--
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org
"Peter Newman" <anonymous (AT) discussions (DOT) microsoft.com> wrote
Quote:
I have a DTS that is importing text files as a scheduled
task. I would like to be able to generate a word doc and
mail it to a list of clients. I know its possible under
Visual Basic, but has anybody managed to get a DTS
activex task to call a Word Document and print it.. ???? |