ACTScript.com

We can help you automate your installations of ACT!, quickly add customizations such as tool bars, with easy, time saving Visual Basic Scripts with One Click!

Free Scripts

Set Default Locations

'SetDefaultLocation.vbs
'Rick Shaddock, Rick@CICorp.com, 202-829-4444

'This specifies the default location for documents in the
'Preferences dialog box and accordingly in the ACT! application.


Dim objApp 'as object
Dim objPreferences 'as object

'Initialize the Application object.
'This starts ACT! if it is not already running.
Set objApp = CreateObject("ACTOLE.APPOBJECT")

'Open the database.
objApp.OpenFile "C:\ACT\Database\ACT5demo.dbf"

'Set the Preferences object.
Set objPreferences = objApp.Preferences

'Set the default location for documents to C:\MY DOCUMENTS (General tab).
objPreferences.SetDefaultLocation 0, "C:\ACT\Database"
objPreferences.SetDefaultLocation 1, "C:\ACT\Document"
objPreferences.SetDefaultLocation 2, "C:\ACT\Template"
objPreferences.SetDefaultLocation 3, "C:\ACT\Report"
objPreferences.SetDefaultLocation 4, "C:\ACT\Sync"
objPreferences.SetDefaultLocation 5, "C:\ACT\Query"
objPreferences.SetDefaultLocation 6, "C:\ACT\Layout"
objPreferences.SetDefaultLocation 7, "C:\ACT\Macro"
objPreferences.SetDefaultLocation 8, "C:\ACT\BrfCase"
objPreferences.SetDefaultLocation 9, "C:\ACT\Outbox"
objPreferences.SetDefaultLocation 10, "C:\ACT\Spell"
objPreferences.SetDefaultLocation 10, "C:\ACT\Email"
objPreferences.SetDefaultLocation 12, "C:\ACT\NetLinks"


'Close the application.
Set objPreferences = Nothing
Set objApp = Nothing
 

Add ToolBar button


ACTHelp.com
202-829-4444
800-319-3190

.