AutoExit( ) macrofunction

R

Roberto Perez

Hello all and thank you in advance.

I'm not an expert using macros on DOT files so my question
is regarding how different is WordBasic inside Word 2000.

Please, send your answer directly to my email.

Our AutoExit( ) macrofunction is not working any more with
Windows 2000. Somebody can help me?

Here is our old AutoExit( ) macrofunction:

/*******************************************************
Public Sub MAIN()

If WordBasic.CountWindows() > 0 Then
Static Button%
Static nLParam%
Button% = WordBasic.MsgBox("Do you want to Save the
Document?", "SYSTEM", 36)
If Button% = -1 Then
nLParam% = 0
Else
nLParam% = 1
End If

If WordBasic.AppIsRunning("System - " + "[Reports]") Then
WordBasic.AppSendMessage "SysTem - " + "[Reports]",
1033, 0, nLParam
End If

End If

End Sub
*******************************************************/
 
R

Roberto Perez

Hello Doug:

I have solved my problem. We are using the old ActiveX for
Microsoft Word 8.0 but we was able to figured it out how
use the same ActiveX on W2K and I'll make the test for WXP.

This is my understanding about this matter. Seems like
until WindowsNT, the OS move the entire Macro function to
the queue and is executing section by section until the
end. With W2K this is not happening, as soon as W2K find
any command line finishing the APP then W2K remove the
rest of the instructions so, the next line never returns
an appropriate result because nothing is in memory
ignoring the body of If-Then-End If.

The solution was comment the "If <condition> Then"
and "End If" lines letting W2K execute the body only. As
you can see, was necessary modify a little bit other
macros in order to make "Disable" the macros when those
macros finish the APP, in other words, we don't want the
AutoExit() executed when other conditions are in place
already.

Thank you very much.

Regards,
Roberto Perez.
-----Original Message-----
Hello all and thank you in advance.

I'm not an expert using macros on DOT files so my question
is regarding how different is WordBasic inside Word 2000.

Please, send your answer directly to my email.

Our AutoExit( ) macrofunction is not working any more with
Windows 2000. Somebody can help me?

Here is our old AutoExit( ) macrofunction:

/*******************************************************
Public Sub MAIN()

If WordBasic.CountWindows() > 0 Then
Static Button%
Static nLParam%
Button% = WordBasic.MsgBox("Do you want to Save the
Document?", "SYSTEM", 36)
If Button% = -1 Then
nLParam% = 0
Else
nLParam% = 1
End If

If WordBasic.AppIsRunning("System - " + "[Reports]") Then
WordBasic.AppSendMessage "SysTem - " + "[Reports]",
1033, 0, nLParam
End If

End If

End Sub
*******************************************************/
.
 

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

Top