Closing Applications
NickHK,
Who is Intellisense? The MindManager app is from Mindjet Corporation. And
yes, I've browsed their object model using Object Browser. But, could not
find a close, quit, exit, etc. method for the Application object. I've also
sent a tech support request to Mindjet Corporation regarding this issue.
Thanks for the tip on the object declaration.
Regards,
VBA Dabbler
"NickHK" wrote:
VBA Dabbler,
Does Intellisense not give you a list of correct methods/properties etc of
the MMApp object ?
You can also use the Object Browser to search the object's model.
A different point is the use of the "Dim MyObj As New XX" syntax.
Although has it's uses, one effect is that whenever you refer to MyObj in
code you create an instance of XX, if it does not currently exist. You do
not need this functionality, so split this line into the Dim and Set;
i.e. Dim MyObj As XX
Set MyObj = New XX
NickHK
"VBA Dabbler" wrote in message
...
Does anyone know how to close an application that is "not" in the MS
Office
Suite?
Following is code I used to create a new instance of the object, but can't
seem to find the method to close the application:
Sub OpenOtherApplication(FilePath, FileName)
Dim MMApp As New MindManager.Application
Dim FilePathAndName As String
FilePathAndName = FilePath & "\" & FileName
MMApp.Visible = True
MMApp.Documents.Open (FilePathAndName)
.
.
.
MMApp.ActiveDocument.Close
Set MMApp = Nothing
End Sub
The above code functions, but I can't close the application - an instance
remains with a virgin document - I have to manually close it.
Any help would be most appreciated.
Regards,
VBA Dabbler
|