Approach User Support homepage Approach User Support
Answers to Frequently Asked Questions about Lotus Approach
Examples LotusScripts
Example databases
Links to other Lotus Approach support services

[Return to contents]

Example LotusScript: Launch multiple Approach applications at start-up

Last updated: before December, 1998

Written by Jerry Sikes <Unisource Converting>, 1997
(C) Copyright 1997 by Jerry Sikes
Permission is granted to freely copy this script in electronic form,
or to print for personal use. It may be used in any Approach database,
but may not be distributed for profit either by itself or as part of
a collection or database.
Disclaimer: This script is provided as is without any express or
implied warranties. The author assumes no responsibility for errors or
omissions, or for damages resulting from the use of the information contained
herein, or your own version containing your desires for the usage of the
script.
This global script is attached to an open macro in Approach which forces a
second application to open with the first eveytime. It also checks to see if
the app is aready open.
Sub OpenMyDocs
        Dim MyDoc As String
        Dim NumDocs As Integer
        Dim Docs As Variant
        Dim MyOpen As String
        Dim fname As String
        If(CurrentApplication.Documents.IsEmpty=False) Then
                NumDocs = CurrentApplication.Documents.count
                For i = 0 To NumDocs-1
                        Print CurrentApplication.Documents(i).Name
                        If CurrentApplication.Documents(i).Name="Scheduling" Then
                                MyOpen="True"
                        End If
                Next
        End If
        If MyOpen ="True" Then
                CurrentApplication.Scheduling.activate
        Else
                Set CurrentDocument= CurrentApplication.OpenDocument("Scheduling.apr","f:\orders")
        End If
        CurrentApplication.By_Assignment.activate
        CurrentApplication.ApplicationWindow.domenucommand(IDM_TILE_TOP_BOTTOM)
End Sub

[Return to contents]

© Copyright, JohnBrown, Trademarks, Disclaimer, Acknowledgements.