I use extensive Excel-Word linking, updated manually with a macro. If the Excel file is not open, Word attempts to open it, warns that opening it again is trouble, requires a dialog box be answered, then go to the next link and starts again. Since there are usually 100 links, this is a big problem.
I found a simple macro that calls a function to check if Excel is running . . .
Dim sApp As String sApp = "Excel.Application" If IsAppRunning(sApp) = True Then MsgBox "Excel is Running, continue" & SourceFileName Else MsgBox "Excel is NOT Running, abort" Exit Sub End If
. . . but I want to check to see if the RIGHT Excel file is open. The "right" file will have the same name as the Word file, e.g., MyDocSample.doc will be linked to MyDocSample.xls.
If MyDocSample.xls is open, the macro should continue, if not, a warning should be posted saying "MyDocSample.xls" is not open, and offer an Abort selection.
Thanks in advance, Dave
Aucun commentaire:
Enregistrer un commentaire