Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
liakamai
Starting Member
4 Posts |
Posted - 2006-02-14 : 20:18:54
|
I need to open word documents from DTS using VB Script to search contents within. Is it possible to open a word document from DTS using VB Script? |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-14 : 22:39:35
|
While its possible, Its not advisable. The problem will be that there is a possibility of word instance running in the server even after you close the application.This line code I used to create an Excel object in my DTS. The same should work for word also.Set appExcel = CreateObject("Excel.Application")After the above line of code you should be able to access the methods and properties of the object.Hope it helps.ThanksKarunakaran |
 |
|
liakamai
Starting Member
4 Posts |
Posted - 2006-02-15 : 14:14:35
|
The syntax seems to work. Your advice about the "possibility of word instance running in the server even after it has been closed" has me a bit concerned so I'll make sure to do some testing to make sure that it has been closed. Thank you for your help |
 |
|
karuna
Aged Yak Warrior
582 Posts |
Posted - 2006-02-15 : 22:53:51
|
Glad it helped.Also make sure you call this finally, your objectname.quitsay appWord.Quit and set appWord = nothing.This should close the application and destroy the instance. For me this used to work.ThanksKarunakaran |
 |
|
|
|
|