Rocket Software Homepage
Forum Home Forum Home > AccuTerm Knowledge Base (read only) > Advanced Features
  New Posts New Posts RSS Feed - Excel workbook using ObjectBridge
  FAQ FAQ  Forum Search   Register Register  Login Login

The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum.

Forum LockedExcel workbook using ObjectBridge

 Post Reply Post Reply
Author
Message
jtillia View Drop Down
Beta Tester
Beta Tester


Joined: August 03 2004
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote jtillia Quote  Post ReplyReply Direct Link To This Post Topic: Excel workbook using ObjectBridge
    Posted: 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
Back to Top
jtillia View Drop Down
Beta Tester
Beta Tester


Joined: August 03 2004
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote jtillia Quote  Post ReplyReply Direct Link To This Post 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;   
Back to Top
PSchellenbach View Drop Down
Admin Group
Admin Group

Moderator

Joined: December 15 2003
Location: United States
Status: Offline
Points: 2150
Post Options Post Options   Thanks (0) Thanks(0)   Quote PSchellenbach Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
jtillia View Drop Down
Beta Tester
Beta Tester


Joined: August 03 2004
Location: United States
Status: Offline
Points: 67
Post Options Post Options   Thanks (0) Thanks(0)   Quote jtillia Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.