tasks-Object ??? or an alternative

  • Thread starter Thread starter M.Erlinger
  • Start date Start date
M

M.Erlinger

Hello

i'm new in excel-programming - and have following problem:

i have in word-vba this makro:
*For Each mytask In Tasks
* If mytask.Name = "Document_Work" Then
* Application.Visible = False
* mytask.SendWindowMessage 1024, 0, 0
* End If
*Next mytask
to find out the application who started this word-session and go back to
this application.

now i want do the same in excel - but i saw, that there is no
"tasks"-object - how could i solve this problem in excel-vba - or who know's
an good alternative-solution.

many thank's in advance
Michael E.
 
YOu could use automation to call into word, like so

Dim wordApp As Object

Set wordApp = CreateObject("Word.Application")
If wordApp.Tasks.Exists("Microsoft Powerpoint") = False Then
MsgBox "No powerpoint"
End If
Set wordApp = Nothing


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Or probably easier to just test for the app like so

Dim App As Object

On Error Resume Next
Set App = GetObject(, "Powerpoint.Application")
If App Is Nothing Then
MsgBox "No powerpoint"
End If
Set App = Nothing


--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top