I'm trying to use the tasks option in visual basic. Another words I'm adding a reference to microsoft office 97, and then using the following statements that checks to see if a certain program is running, then changes that program if it is running to be the active window by chaning the window state.
The problem is...."This only works when a word project is open" Am I on crack or what? Is there some way to do this without word running? Thanks very much. -db
If Tasks.Exists("TAMC"
= True Then
If Tasks("TAMC"
.WindowState = wdWindowStateMaximize Then
Tasks("TAMC"
.WindowState = wdWindowStateNormal
Tasks("TAMC"
.WindowState = wdWindowStateMaximize
Else
Tasks("TAMC"
.WindowState = wdWindowStateMaximize
End If
Else
MsgBox "Cannot find TAMC"
Exit Sub
End If
The problem is...."This only works when a word project is open" Am I on crack or what? Is there some way to do this without word running? Thanks very much. -db
If Tasks.Exists("TAMC"
If Tasks("TAMC"
Tasks("TAMC"
Tasks("TAMC"
Else
Tasks("TAMC"
End If
Else
MsgBox "Cannot find TAMC"
Exit Sub
End If