![]() |
| The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
|
Post Reply
|
| Author | |
jtillia
Beta Tester
Joined: August 03 2004 Location: United States Status: Offline Points: 67 |
Post Options
Thanks(0)
Quote Reply
Topic: Excel workbook using ObjectBridgePosted: February 28 2006 at 2:15am |
|
We should always check to see if the user already has the workbook open in excel. Otherwise, the workbook is not written. It would seem that we could check this with
WorkBooks("book.name") This should give us true or false, even if it is not the active workbook. wrk.nme = 'wosum_203980.xls' obj.nme = "WorkBooks(":wrk.nme:")" CALL ATGETPROPERTY(ExcelApplication, obj.nme, exist.flag, ERRMSG, OPTS) crt 'exist flag ':exist.flag |
|
![]() |
|
jtillia
Beta Tester
Joined: August 03 2004 Location: United States Status: Offline Points: 67 |
Post Options
Thanks(0)
Quote Reply
Posted: March 06 2006 at 9:46am |
|
As a follow up, I could use help with this script. If this could give us a list of running taaks in windows, we could then loop through these and look for our excel application.
Set objShell = CreateObject("Wscript.Shell") Set objWord = CreateObject("Word.Application") Set colTasks = objWord.Tasks i = 0 For Each objTask in colTasks strName = LCase(objTask.Name) If Instr(strName, "inventory.xls") Then i = 1 End If Next strCmdLine = "excel.exe " & chr(34) & "C:\Scripts\Inventory.xls" & chr(34) If i = 0 Then objShell.Run strCmdLine, 3 End If objWord.Quit I don't really want to open excel in this way, but I could then find out if the user can procede with the ftd command. &nbs p; |
|
![]() |
|
PSchellenbach
Admin Group
Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
Quote Reply
Posted: March 10 2006 at 6:18am |
|
Hi -
Are you sure you want to look at the Word application object instead of Excel? Thanks, Peter |
|
![]() |
|
jtillia
Beta Tester
Joined: August 03 2004 Location: United States Status: Offline Points: 67 |
Post Options
Thanks(0)
Quote Reply
Posted: March 10 2006 at 6:48am |
|
Well not really, but here is a link to the Technet Article that explains this.
http://www.microsoft.com/technet/scriptcenter/resources/qand a/apr05/hey0427.mspx I think I need to know if the workbook is open or not. Otherwise, ftd will not update the file and my user will not know that. Also, I should not quit the appolication, if the user has other workbooks open, but not the one that I have. If they don not have any open, then I should close it. Just look for how to know this. |
|
![]() |
|
Post Reply
|
|
|
Tweet
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |