TABLE OF CONTENTS

License and Warranty Addendum... iv

The software you are acquiring has been specially configured to run on a network, and consequently Interact Commerce Corporation grants to you the right to use the enclosed Software on a computer network provided that for each and every concurrent user on the network, you have acquired and dedicated one licensed copy of the software. iv

What’s Included. 5

“How-Do-I” support 7

Consulting Services. 7

Programming Services. 8

Conventions used in this section. 17

Syntax conventions. 17

Terminology. 18

Parameter types. 18

Special data types. 19

Date and time formats. 19

Phone formats. 20

Overview of the ACT! OLE Database Object 21

How can developers use an ACT! OLE Database Object?. 21

How does the OLE Database Object affect the ACT! user interface?. 21

Is the OLE Database Object a database tool for developing applications that can access ACT! data?  21

Features and limitations of the ACT! OLE Database Object 22

System requirements. 22

Development languages. 22

Using the Database Object with Visual C++. 22

Example VISUAL C++ code. 23

Using properties in Visual C++. 24

Understanding key files. 24

Using the type library. 25

ACT! Database Unique ID field considerations. 25

ACT! OLE Database Object definitions. 26

ACT! OLE object model 27

What’s new   28

Changes for ACT! 3.0.6. 28

Changes for ACT! 3.0.7. 29

Changes for ACT! 4.0. 29

Changes for ACT! 4.0.2. 30

Changes for ACT! 2000. 30

Common properties and methods. 34

Add Method. 38

Close Method. 39

Data Property. 39

Delete Method. 40

Edit Method. 41

Error Property. 41

Execute Method. 42

FieldCount Property. 42

Fields Property. 43

FindDuplicates Method (requires ACT! 2000 or later) 43

GetDataEx Method (requires ACT! 4.0.2 or later) 44

GetDuplicateCriteria Method (requires ACT! 2000 or later) 46

GetSort Method (requires ACT! 4.0 or later) 47

GoTo Method. 48

IsBOF Property. 48

IsEOF Property. 49

IsLocked Property. 49

IsOpen Property. 49

Jump Method. 50

LastError Property. 50

LockLevel Property. 51

Lookup Method. 51

LookupKeyword Method. 52

MoveFirst Method. 53

MoveLast Method. 53

MoveNext Method. 53

MovePrevious Method. 54

Name Property. 54

Position Property. 54

Query Property. 55

Rebuild Method. 55

RecordCount Property. 55

SetDataEx Method (requires ACT! 4.0.2 or later) 56

SetDuplicateCriteria Method (requires ACT! 2000 or later) 57

Sort Method. 58

Update Method. 59

Activity object properties and methods. 60

Clear Method. 62

ClearClearedFilter Method. 62

ClearContactScope Method. 62

ClearDateScope Method. 63

ClearGroupScope Method. 63

ClearPriorityFilter Method. 63

ClearRecurring Method. 64

ClearTimedFilter Method. 64

ClearTimelessFilter Method. 64

ClearTypeFilter Method. 65

ClearUnclearedFilter Method. 65

ExceptionInfo Property. 65

FirstScheduledWith Property. 66

GetDaysOfMonthBits Method. 67

GetDaysOfWeekBits Method. 68

GetRecurringFrequency Method. 69

GetRecurringUntilDate Method. 70

GetWeeksOfMonthBits Method. 71

HasAlarm Method. 72

HasDetails Method (requires ACT! 2000 or later) 72

IsClear Method. 73

IsOutlookActivity Method (requires ACT! 2000 or later) 73

IsRecurring Method. 74

IsTimeless Method. 74

NextScheduledWith Property (requires ACT! 4.0 or later) 75

RecurringChangeMode Property. 76

recurringType Property. 76

SetClearedFilter Method. 77

SetContactScope Method. 77

SetDateScope Method. 78

SetGroupScope Method. 79

SetPriorityFilter Method. 79

SetRecurringDays Method. 80

SetRecurringDaysAndWeeksofMonth Method. 80

SetRecurringWeekDays Method. 82

SetTimedFilter Method. 83

SetTimeless Method. 83

SetTimelessFilter Method. 83

SetTypeFilter Method. 84

SetUnclearedFilter Method. 84

Unclear Method. 85

Contact object methods. 86

LoadLookUpQuery Method (requires ACT! 3.0.6 or later) 86

LookupMyRecord Method (requires ACT! 2000 or later) 86

SetAsMyRecord Method (requires ACT! 4.0 or later) 87

Database object properties and methods. 89

ActiveUserCount Property. 91

Activity Property. 91

ActVersion Method (requires ACT! 3.0.6 or later) 92

BeginBatchInsert Method (requires ACT! 4.0.2 or later) 92

BeginBatchUpdate Method (requires ACT! 4.0.2 or later) 93

Close Method. 95

Contact Property. 95

CurrentUser Property. 95

DatabaseVersion Method (requires ACT! 4.0 or later) 96

Email Property. 96

EndBatchInsert Method (requires ACT! 4.0.2 or later) 97

EndBatchUpdate Method (requires ACT! 4.0.2 or later) 97

GetDatabasePath Method (requires ACT! 4.0 or later) 97

GetTableId Method (requires ACT! 3.0.6 or later) 98

GetTableNameFromId Method (requires ACT! 3.0.6 or later) 99

GetTableNameFromIndex Method (requires ACT! 3.0.6 or later) 99

GetUniqueId Method. 100

Group Property. 100

IsInBatchMode Property (requires ACT! 4.0.2 or later) 100

IsLocked Property (requires ACT! 4.0.2 or later) 101

IsMultiUser Property. 101

IsOpen Property. 101

IsOpening Property. 102

Lock Method (requires ACT! 4.0.2 or later) 102

LogTransactions Property. 103

MajorVersion Property. 103

MinorVersion Property. 104

Name Property. 104

NoteHistory Property. 104

Open Method. 105

OpenEx Method (requires ACT! 4.0 or later) 105

PhoneFormatting Property. 106

Relations Property (requires ACT! 3.0.6 or later) 106

TableCount Method (requires ACT! 3.0.6 or later) 107

Unlock Method (requires ACT! 4.0.2 or later) 107

Users Property. 107

ValidateUser Method. 108

Version Property (requires ACT! 3.0.6 or later) 109

Email object methods. 110

ClearContactScope Method (requires ACT! 3.0.7 or later) 110

SetContactScope Method (requires ACT! 3.0.7 or later) 110

ExceptionInfo object properties and methods. 112

Add Method. 112

Clear Method. 113

Count Property. 113

Remove Method. 113

Seek Method. 114

Value Method. 114

Fields object properties and methods. 115

AutoPopulate Property (requires ACT! 2000 or later) 116

BeginBatch Method (requires ACT! 4.0.2 or later) 117

Count Property. 118

DecimalPlaces Property. 119

EndBatch Method (requires ACT! 4.0.2 or later) 119

EntryRule Property (requires ACT! 4.0.2 or later) 119

EntryTrigger Property. 120

Exists Property. 121

ExitTrigger Property. 121

FieldId Property (requires ACT! 3.0.7 or later) 122

FieldIdAt Property (requires ACT! 3.0.6 or later) 122

Flags Property. 123

GetLinkToList Method (requires ACT! 2000 or later) 123

HasPopupList Property. 124

Id Property. 125

InitialValue Property. 125

IsBlockSync Property. 125

IsCutHistory Property. 126

IsIndexed Property. 126

IsPrimary Property. 127

IsSortable Property. 127

Label Property. 128

Length Property. 128

Modifiable Property. 129

POPUPINFO Property. 129

SetLinkToList Method (requires ACT! 2000 or later) 130

Type Property. 131

UnLinkLists Method (requires ACT! 2000 or later) 132

Group object properties and methods. 134

AddContact Method. 135

AddSubGroup Method (requires ACT! 2000 or later) 135

AssignParent Method (requires ACT! 2000 or later) 136

ChangeToParentGroup Method (requires ACT! 2000 or later) 137

ChangeToSubGroup Method (requires ACT! 2000 or later) 137

ClearContactScope Method (requires ACT! 3.0.7 or later) 138

ContactCount Property. 138

GetParent Method (requires ACT! 2000 or later) 139

GetSubGroup Method (requires ACT! 2000 or later) 139

GetSubGroupCount Method (requires ACT! 2000 or later) 140

GetSubGroupList Method (requires ACT! 2000 or later) 141

GroupType Method (requires ACT! 2000 or later) 142

Members Property. 143

RemoveContact Method. 143

SetContactScope Method (requires ACT! 3.0.7 or later) 143

ListTable object methods. 145

ClearScope Method (requires ACT! 2000 or later) 145

GetScope Method (requires ACT! 2000 or later) 146

SetScope Method (requires ACT! 2000 or later) 146

Members object properties. 148

Name Property. 149

UniqueId Property. 149

NoteHistory object methods. 150

History types. 150

ClearAttachmentFilter Method. 152

ClearContactScope Method. 152

ClearGroupScope Method. 152

ClearHistoryFilter Method. 153

ClearNoteFilter Method. 153

SetAttachmentFilter Method. 153

SetContactScope Method. 154

SetGroupScope Method. 154

SetHistoryFilter Method. 155

SetNoteFilter Method. 155

PopupInfo object properties and methods. 156

Add Method. 156

Clear Method. 157

PopupCount Property. 157

Remark Method. 158

Remove Method. 158

Value Method. 158

Relations object properties and methods. 160

Count Property (requires ACT! 3.0.6 or later) 161

GetColumn1ID Method (requires ACT! 3.0.6 or later) 162

GetColumn2ID Method (requires ACT! 3.0.6 or later) 162

GetRelationType Method. 162

GetTable1ID Method (requires ACT! 3.0.6 or later) 163

GetTable2ID Method (requires ACT! 3.0.6 or later) 163

UsesRelationTable Method (requires ACT! 3.0.6 or later) 163

Sales object methods. 165

AssociateWithContact Method (requires ACT! 2000 or later) 165

AssociateWithGroup Method (requires ACT! 2000 or later) 166

CompleteSale Method (requires ACT! 2000 or later) 167

ReopenSale Method (requires ACT! 2000 or later) 168

Users object properties and methods. 170

Access Property. 171

AddUser Method (requires ACT! 4.0 or later) 171

CheckIsPhonebook Method (requires ACT! 4.0 or later) 173

Count Property. 174

CurrentUserAccess Method (requires ACT! 3.0.6 or later) 174

CurrentUserId Method (requires ACT! 3.0.6 or later) 174

CurrentUserName Method (requires ACT! 3.0.6 or later) 175

CurrentUserSecurity Method (requires ACT! 3.0.6 or later) 175

Exists Property. 176

GetPassword Method (requires ACT! 4.0 or later) 176

IsValidPassword Method. 177

Name Property. 177

Security Property. 178

SetAsPhonebook Method (requires ACT! 4.0 or later) 178

SetPassword Method. 179

UniqueId Property. 179

Conventions used in this section. 196

Syntax conventions. 196

Terminology. 196

Parameter types. 197

Special considerations. 197

Using properties in Visual C++. 198

Changing the focus. 198

System requirements. 198

Development languages. 198

Using the Application Object with Visual C++. 198

Example C++ code. 199

Understanding key files. 200

ACT! OLE Application Object model 201

What’s new   202

Changes for ACT! 4.0. 202

Changes for ACT! 2000. 204

Changes for ACT! 2000 version 5.0.2. 205

Common properties and methods. 208

Activate Method. 209

Active Property. 210

Application Method. 210

Caption Property. 210

ClearError Method (requires ACT! 4.0 or later) 211

Close Method. 211

CurrentFieldId Method (requires ACT! 2000 or later) 212

CurrentRecord Method (requires ACT! 2000 or later) 212

Displayed Property. 213

GetLastError Method. 213

GetMode Method (requires ACT! 2000 or later) 214

HasRecordChanged Method (requires ACT! 2000 or later) 215

LookupKeyword Method (requires ACT! 2000 or later) 215

Maximize Method. 216

Minimize Method. 216

Name Property. 217

Parent Method. 217

ReSize Method. 217

Show Method. 218

Type Property. 219

Update Method. 219

ViewState Property (requires ACT! 2000 or later) 220

Application object properties and methods. 221

ActVersion Property (requires ACT! 2000 or later) 223

AddUser Method. 224

BackupDB Method (requires ACT! 4.0 or later) 225

Caption Property. 225

ChangePassword Method. 226

ClearError Method (requires ACT! 4.0 or later) 227

CloseDB Method. 227

Command Method. 227

CompressDB Method. 228

GetActiveDB Method (not currently implemented) 228

GetAppName Method. 229

GetAppPath Method. 229

GetCurrentUserName Method (requires ACT! 4.0 or later) 230

GetLastError Method. 230

GetOpenDBName Method. 230

GetPosition Method. 231

GetSize Method. 232

GetUserId Method. 232

GetUserPrivilege Method. 233

GetVersion Method (requires ACT! 4.0 or later) 233

Help Method. 234

IsDBOpen Method. 234

IsVisible Method. 234

LastContactListModTime Property. 235

Maximize Method. 235

Minimize Method. 235

OpenDB Method. 236

OpenFile Method. 236

Preferences Method. 237

ProcessFile Method. 237

PurgeHistories Method. 238

PurgeNotes Method. 238

PurgeTransactions Method. 239

ReIndexDB Method. 240

RemoveOutlookActivities Method (requires ACT! 2000 or later) 241

ReSize Method. 241

RestoreDB Method (requires ACT! 4.0 or later) 242

RunMacro Method. 242

SaveCurrentLookup Method. 243

SendKey Method. 243

Show Method. 244

Update Method. 245

UpdateOutlookActivities Method (requires ACT! 2000 or later) 245

Views Method. 246

CalendarView object methods. 247

GetActiveMonth Method. 248

GetCalendarMode Method. 248

SetActiveMonth Method. 249

SetCalendarMode Method. 249

ContactListView object methods. 250

AddNewContact Method (obsolete) 250

AddNewContactEx Method (requires ACT! 4.0 or later) 250

GetGrid Method. 251

ContactView object methods. 253

Activities Method. 255

AddContactToGroup Method. 255

AddNewActivity Method (obsolete) 256

AddNewActivityEx Method (requires ACT! 4.0 or later) 257

AddNewContact Method. 258

AddNoteHistory Method (obsolete) 259

AddNoteHistoryEx Method (requires ACT! 4.0 or later) 259

AttachFile Method (requires ACT! 4.0 or later) 261

BOL Method. 261

CompleteSale Method (requires ACT! 2000 or later) 262

CreateLookup Method (requires ACT! 2000 or later) 263

CreateSalesForecast Method (requires ACT! 2000 or later) 263

Delete Method. 264

DeleteContactFast Method (requires ACT! 2000 or later) 265

EOL Method. 265

GetActiveGroup Method. 266

GetActiveGroupName Method. 267

GetActiveTab Method. 268

GetCount Method. 269

GetCurrentID Method. 269

GetField Method. 270

GetTabCount Method (requires ACT! 4.0 or later) 270

GetTabName Method (requires ACT! 4.0 or later) 271

Goto Method. 272

GroupMembership Method. 272

LookupAll Method. 273

LookupField Method (obsolete) 273

LookupFieldEx Method (requires ACT! 4.0 or later) 273

LookupMyRecord Method. 275

LookupPrevious Method. 275

MoveFirst Method. 275

MoveLast Method. 276

MoveNext Method. 276

Moveprevious Method. 276

NewContactDialog Method (requires ACT! 4.0 or later) 277

NotesHistory Method. 277

RunQuery Method. 277

Sales Method (requires ACT! 2000 or later) 278

SaveQuery Method. 279

SelectContactDlg Method (requires ACT! 4.0 or later) 279

SetActiveGroup Method. 280

SetActiveGroupName Method (requires ACT! 4.0 or later) 281

SetActiveTab Method. 281

SetField Method. 281

TriggerActivitySeries Method (requires ACT! 2000 or later) 282

EmailView object methods. 284

GetActiveInbox Method. 284

GetInboxCount Method. 285

GetInboxName Method. 285

GetOpenFolderMessageCount Method (requires ACT! 2000 or later) 286

MsgComposeView Method. 286

OpenInbox Method. 287

SetActiveInbox Method. 287

Sort Method (requires ACT! 2000 or later) 288

ExplorerView object methods. 289

GetStartupURL Method. 290

GetURL Method. 290

GoBack Method. 290

GoForward Method. 291

Refresh Method. 291

SetURL Method. 291

Stop Method. 292

Grid object methods. 293

BOL Method. 294

DeleteRow Method. 295

EOL Method. 295

GetColumnCount Method. 296

GetColumnID Method. 297

GetColumnName Method. 298

GetCurrentRow Method. 299

GetField Method. 299

GetFilter Method (requires ACT! 4.0 or later) 300

GetLastError Method. 302

GetRowCount Method. 302

GetRowNumber Method. 303

GetUniqueID Method. 303

Goto Method. 303

MoveFirst Method. 304

MoveLast Method. 304

MoveNext Method. 305

Moveprevious Method. 305

RefreshGrid Method. 305

SelectRow Method. 306

SetField Method. 306

SetFilter Method (requires ACT! 4.0 or later) 307

Sort Method. 308

GroupView object methods. 309

Activities Method. 310

AddMemberToGroup Method. 311

AddNew Method. 312

AddNewSubGroup Method (requires ACT! 2000 or later) 313

AddNote Method (obsolete) 314

AddNoteEx Method (requires ACT! 4.0 or later) 314

AttachFile Method (requires ACT! 4.0 or later) 315

BOL Method. 316

ChangeToParentGroup Method (requires ACT! 2000 or later) 316

ChangeToSubGroup Method (requires ACT! 2000 or later) 317

Collapse Method (requires ACT! 2000 or later) 317

ContactMembers Method. 318

Delete Method. 319

DeleteGroupFast Method (requires ACT! 2000 or later) 319

EOL Method. 319

Expand Method (requires ACT! 2000 or later) 320

GetActiveTab Method. 320

GetCount Method. 321

GetCurrentID Method. 322

GetField Method. 323

GetSubGroupCount Method (requires ACT! 2000 or later) 323

GetTabCount Method (requires ACT! 4.0 or later) 324

GetTabName Method (requires ACT! 4.0 or later) 324

Goto Method. 324

GroupType Method (requires ACT! 2000 or later) 325

IsExpanded Method (requires ACT! 2000 or later) 325

LookupAll Method. 326

LookupField Method (obsolete) 326

LookupFieldEx Method (requires ACT! 4.0 or later) 326

LookupPrevious Method. 327

MoveFirst Method. 327

MoveLast Method. 328

MoveNext Method. 328

Moveprevious Method. 329

NotesHistory Method. 329

RunQuery Method. 329

SaveQuery Method. 330

SetActiveTab Method. 331

SetField Method. 331

MailComposeView object methods. 333

AddAttachment Method. 334

AddBccRecepient Method (requires ACT! 2000 or later) 335

AddCcRecepient Method (requires ACT! 2000 or later) 336

AddRecepient Method. 336

ClearAll Method. 336

ClearAttachments Method. 337

ClearBodyText Method. 337

ClearRecepients Method. 337

ClearSubject Method. 338

Send Method. 338

SetBodyText Method. 338

SetSubject Method. 339

Preferences object properties and methods. 340

AttachMsgToContact Property (requires ACT! 4.0 or later) 343

AttachToMsgUsing Property (requires ACT! 4.0 or later) 344

CalendarStartTime Property. 345

CalendarWeekStartsOn Property. 345

CalMinDurationForBanner Property (requires ACT! 4.0 or later) 346

CheckScheduleConflicts Property. 348

ClearError Method (requires ACT! 4.0 or later) 349

ContactSalutation Property (requires ACT! 4.0 or later) 349

DefaultContactLayout Property. 350

DefaultGroupLayout Property. 351

DisplayCountryCode Property. 352

EnableSpeedLoader Property (requires ACT! 4.0 or later) 353

ExitPrompt Property. 354

GenerateSynchReport Property (requires ACT! 4.0 or later) 355

GetActivityCleanupStyle Method. 355

GetAttachmentInfo Method (requires ACT! 4.0 or later) 356

GetCalendarIncrements Method. 356

GetDataToSynch Method (requires ACT! 4.0 or later) 357

GetDBMaintReminderInfo Method (requires ACT! 2000 or later) 358

GetDefaultApplication Method. 359

GetDefaultLocation Method. 359

GetEmailInboxSettings Method. 360

GetEmailNewMsgInfo Method. 361

GetEmailSystem Method (requires ACT! 4.0 or later) 362

GetLastError Method (requires ACT! 4.0 or later) 362

GetNameSettings Method. 362

GetSchdActivityDefaults Method. 363

GetSchdAutoRollover Method. 365

GetStyle Method. 366

GetSynchSchedule Method (obsolete) 366

GetSynchScheduleInfo Method (requires ACT! 4.0 or later) 367

GetSynchSettings Method. 368

GetSynchUpdateInfo Method (requires ACT! 4.0 or later) 368

NewActivitiesPrivate Property. 369

NewActivitiesSeparate Property (requires ACT! 4.0 or later) 370

NewContactsPrivate Property. 371

NewGroupsPrivate Property. 372

PromptToPrintEnvelope Property (requires ACT! 4.0 or later) 373

ReceivedSynchLocation Property (requires ACT! 4.0 or later) 374

RememberPassword Property. 374

RemindToBackup Property (requires ACT! 4.0 or later) 375

ReturnReceipt Property (requires ACT! 4.0 or later) 376

SecondGroupColumn Property. 377

SetActivityCleanupStyle Method. 377

SetAttachmentInfo Method (requires ACT! 4.0 or later) 378

SetCalendarIncrements Method. 380

SetDataToSynch Method (requires ACT! 4.0 or later) 381

SetDBMaintReminderInfo Method (requires ACT! 2000 or later) 382

SetDefaultApplication Method. 383

SetDefaultLocation Method. 384

SetEmailInboxSettings Method. 385

SetEmailNewMsgInfo Method. 386

SetEmailSystem Method (requires ACT! 4.0 or later) 387

SetNameSettings Method. 388

SetSchdActivityDefaults Method. 389

SetSchdAutoRollover Method. 391

SetStyle Method. 392

SetSynchSchedule Method (obsolete) 393

SetSynchScheduleInfo Method (requires ACT! 4.0 or later) 394

SetSynchSettings Method. 395

SetSynchUpdateInfo Method (requires ACT! 4.0 or later) 395

ShowContactParsingDialog Property (requires ACT! 2000 or later) 397

ShowCurrentMonthOnly Property. 397

StartupDatabase Property. 398

StartupMacro Property. 399

TabNavigation Property. 400

UseAct20Keys Property. 401

UseDialer Property (not currently implemented) 402

UseLastDBonStartup Property. 402

UseTypeahead Property (requires ACT! 4.0 or later) 403

WaitTime Property (requires ACT! 4.0 or later) 404

TaskListView object methods. 406

AddNewActivity Method (obsolete) 406

AddNewActivityEx Method (requires ACT! 4.0 or later) 406

GetGrid Method. 408

Views object property and methods. 409

Application Method. 410

ClearError Method (requires ACT! 4.0 or later) 410

CloseAll Method. 410

Count Property. 411

Create Method. 411

CreateBrowserView Method (requires ACT! 2000 version 5.0.2 or later) 412

CreateBrowserViewFromUrl Method (requires ACT! 2000 version 5.0.2 or later) 413

CreateEx Method (requires ACT! 2000 or later) 413

FindExplorerView Method (requires ACT! 4.0 or later) 414

GetActive Method. 415

GetLastError Method. 416

GetView Method. 416

GetViewEx Method (requires ACT! 2000 version 5.0.2 or later) 417

Conventions used in this manual 427

Parameter types. 428

System requirements. 428

Overview   429

Adding a VBScript script file to ACT! 431

Using ACT! Scripting Support with the OLE Application Object 432

Registering the custom control 433

Using event control in Visual Basic. 433

Using event control in Visual C++. 434

Event control methods. 434

Register Method. 434

UnRegister Method. 435

IsActRunning Method. 435

Event control events. 436

OnContactAdd Event 437

OnContactChange Event 437

OnContactDelete Event 437

OnContactListChange Event 438

OnContactLookupChange Event 438

OnContactPosChange Event 438

OnDatabaseClose Event 439

OnDatabaseOpen Event 439

OnGroupAdd Event 439

OnGroupChange Event 440

OnGroupDelete Event 440

OnGroupListChange Event 440

OnGroupPosChange Event 441

OnActUserWantsToClose Event 441

Syntax conventions used in this manual 445

Overview   446

System requirements. 449

What’s new   449

Changes for ACT! 2000. 449

Changes for ACT! 2000 version 5.0.2. 449

Defining the control file header 452

Defining the view in the View section. 452

Adding navigation buttons to the toolbar in the Commands section (ACT! 4.0 only) 455

Adding URL buttons to the navigation toolbar in the URL section. 456

Creating a custom bitmap for the View bar button. 457

Creating custom icons for navigation toolbar buttons. 458

Using a sample control file. 458

Editing a sample control file. 459

Using the added views and tabs. 459

Removing control files. 459

Conventions used in this manual 463

Syntax conventions. 463

Overview   464

System requirements. 464

What’s new   464

Changes for ACT! 2000 version 5.0.2. 464

Understanding the Command Object 467

Command object methods. 468

AddAuxCommand Method. 469

AddAuxCommandEnabled Method (requires ACT! 2000 version 5.0.2 or later) 471

AddAuxCommandToMenu Method (requires ACT! 2000 version 5.0.2 or later) 472

AddAuxCommandToToolbar Method. 474

AddAuxCommandToToolsMenu Method. 475

AddAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later) 476

AuxCommandExists Method. 478

AuxCommandExistsInMenus Method (requires ACT! 2000 version 5.0.2 or later) 478

AuxCommandExistsInToolbar Method. 479

AuxCommandExistsInToolsMenu Method. 480

AuxSubMenuExists Method (requires ACT! 2000 version 5.0.2 or later) 480

DeleteAuxCommand Method. 481

RemoveAuxCommandFromMenus Method (requires ACT! 2000 version 5.0.2 or later) 482

RemoveAuxCommandFromToolbar Method. 483

RemoveAuxCommandFromToolsMenu Method. 484

RemoveAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later) 485

Overview of ACT! Database Files. 491

ACT! database table relationships. 495

What’s New   496

Changes for ACT! 4.0. 496

Changes for ACT! 2000. 496

Looking at ACT! Database Tables. 496

Activity table (.ADB) fields. 496

Contact table (.DBF) fields. 501

E-mail table (.EDB) fields. 508

Group table (.GDB) fields. 509

List table (.DDB) fields (requires ACT! 2000 or later) 513

Notes/History table (.HDB) fields. 514

Relational table (.REL) fields. 517

Understanding the Relational table. 518

Sales table (.SDB) fields (ACT! 2000 or later) 519


Software Development Kit (SDK)
Technical Reference Guide

Windows 2000    Windows 95                               Windows 98                     Windows NT


ACT! Software Development Kit (SDK)
Technical Reference Guide

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


INTERACT COMMERCE CORPORATION LICENSE AND WARRANTY


NOTICE: INTERACT COMMERCE CORPORATION LICENSES THE ENCLOSED SOFTWARE TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT. PLEASE READ THE TERMS CAREFULLY BEFORE OPENING THIS PACKAGE, AS OPENING THE PACKAGE WILL INDICATE YOUR ASSENT TO THEM. IF YOU DO NOT AGREE TO THESE TERMS, THEN INTERACT COMMERCE CORPORATION IS UNWILLING TO LICENSE THE SOFTWARE TO YOU, IN WHICH EVENT YOU SHOULD RETURN THE FULL PRODUCT WITH PROOF OF PURCHASE TO THE DEALER FROM WHOM IT WAS ACQUIRED WITHIN THIRTY DAYS OF PURCHASE, AND YOUR MONEY WILL BE REFUNDED.

LICENSE AND WARRANTY
The software which accompanies this license (the
Software) is the property of Interact Commerce Corporation or its licensors and is protected by copyright law. While Interact Commerce Corporation continues to own the Software, you will have certain rights to use the Software after your acceptance of this license. Except as may be modified by a license addendum which accompanies this license, your rights and obligations with respect to the use of this Software are as follows:

You may:
(i) use only one copy of the Software on a single computer;
(ii) make one copy of the Software for archival purposes, or copy the software onto the hard disk of your computer and retain the original for archival purposes;
(iii) use the Software on a network, provided that you have a licensed copy of the Software for each computer that can access the Software over that network;
(iv) after written notice to Interact Commerce Corporation, transfer the Software on a permanent basis to another person or entity, provided that you retain no copies of the Software and the transferee agrees to the terms of this agreement; and
(v) if a single person uses the computer on which the Software is installed at least 80% of the time, then after registering the product, that person may also use the Software on a single home computer.

You may not:
(i) copy the documentation which accompanies the Software;
(ii) sublicense, rent or lease any portion of the Software;
(iii) reverse engineer, decompile, disassemble, modify, translate, make any attempt to discover the source code of the Software, or create derivative works from the Software; or
(iv) use a previous version or copy of the Software after you have received a disk replacement set or an upgraded version as a replacement of the prior version, unless you donate a previous version of an upgraded version to a charity of your choice, and such charity agrees in writing that it will be the sole end user of the product, and that it will abide by the terms of this agreement. Unless you so donate a previous version of an upgraded version, upon upgrading the Software, all copies of the prior version must be destroyed.

Thirty Day Money Back Guarantee:
If you are the original licensee of this copy of the Software and are dissatisfied with it for any reason, you may return the complete product, together with your receipt, to the place of purchase, postage prepaid, for a full refund at any time during the thirty day period following the delivery to you of the Software.

Limited Warranty:
Interact Commerce warrants that the media on which the Software is distributed will be free from defects for a period of thirty (30) days from the date of delivery of the Software to you. Your sole remedy in the event of a breach of this warranty will be that Interact Commerce will, at its option, replace any defective media returned to Interact Commerce within the warranty period or refund the money you paid for the Software. Interact Commerce does not warrant that the Software will meet your requirements or that operation of the Software will be uninterrupted or that the Software will be error-free.

THE ABOVE WARRANTY IS EXCLUSIVE AND IN LIEU OF ALL OTHER WARRANTIES, WHETHER EXPRESS OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. THIS WARRANTY GIVES YOU SPECIFIC LEGAL RIGHTS. YOU MAY HAVE OTHER RIGHTS, WHICH VARY FROM STATE TO STATE.

Disclaimer of Damages:
REGARDLESS OF WHETHER ANY REMEDY SET FORTH HEREIN FAILS OF ITS ESSENTIAL PURPOSE, IN NO EVENT WILL INTERACT COMMERCE BE LIABLE TO YOU FOR ANY SPECIAL, CONSEQUENTIAL, INDIRECT OR SIMILAR DAMAGES, INCLUDING ANY LOST PROFITS OR LOST DATA ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE EVEN IF INTERACT COMMERCE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE LIMITATION OR EXCLUSION OF LIABILITY FOR INCIDENTAL OR CONSEQUENTIAL DAMAGES SO THE ABOVE LIMITATION OR EXCLUSION MAY NOT APPLY TO YOU. IN NO CASE SHALL INTERACT COMMERCE CORPORATION'S LIABILITY EXCEED THE PURCHASE PRICE FOR THE SOFTWARE. The disclaimers and limitations set forth above will apply regardless of whether you accept the Software.

U.S. Government Restricted Rights:
RESTRICTED RIGHTS LEGEND. All Interact Commerce products and documentation are commercial in nature. The software and software documentation are
Commercial Items, as that term is defined in 48 C.F.R. 2.101, consisting of Commercial Computer Software and Commercial Computer Software Documentation, as such terms are defined in 48 C.F.R. 252.227-7014(a)(5) and 48 C.F.R. 252.227-7014(a)(1), and used in 48 C.F.R. 12.212 and 48 C.F.R. 227.7202, as applicable. Consistent with 48 C.F.R. 12.212, 48 C.F.R. 252.227-7015, 48 C.F.R. 227.7202 through 227.7202-4, 48 C.F.R. 52.227-14, and other relevant sections of the Code of Federal Regulations, as applicable, Interact Commerce's computer software and computer software documentation are licensed to United States Government end users with only those rights as granted to all other end users, according to the terms and conditions contained in this license agreement. Manufacturer is Interact Commerce Corporation, 8800 N. Gainey Center Drive #200, Scottsdale, Arizona, 85258, USA.

General:
This Agreement will be governed by the laws of the State of Arizona. This Agreement may only be modified by a license addendum which accompanies this license or by a written document which has been signed by both you and Interact Commerce. Should you have any questions concerning this Agreement, or if you desire to contact Interact Commerce for any reason, please write: Interact Commerce Customer Sales and Service, 8800 N. Gainey Center Drive #200, Scottsdale, Arizona, 85258, USA.




License and Warranty Addendum

The software you are acquiring has been specially configured to run on a network, and consequently Interact Commerce Corporation grants to you the right to use the enclosed Software on a computer network provided that for each and every concurrent user on the network, you have acquired and dedicated one licensed copy of the software.


Introducing the ACT!TM SDK

The ACT! Software Development Kit (SDK) includes documentation and sample code files for SDK components that are built into the ACT! application. You can use the ACT! SDK to extend the functionality of ACT!, enable external applications to control ACT! and read and write to ACT! database tables, and add auxiliary commands to the user interface to execute external programs. The ACT! SDK was developed for use by ACT! Certified Consultants, ACT! add-on product developers, independent software developers, and corporate developers.

What’s Included

The ACT! Software Development Kit (SDK) Technical Reference Guide is a set of eight documents: this introduction, sections for each of the five current components of the ACT! SDK, two appendixes of reference material, and a Readme file.

The following table describes the documents included in the ACT! Software Development Kit (SDK) Technical Reference Guide.

Section

Document

Description

Introduction

Introducing the ACT! SDK

Introduction to the manual. Includes an overview, license and warranty information, and technical support information.

I

ACT! OLE Database Object

Describes the ACT! OLE Database Object component of the ACT! SDK, which uses OLE automation to enable non-ACT! applications to read and write information in ACT! database tables.

II

ACT! OLE Application Object

Describes the ACT! OLE Application Object component of the ACT! SDK, which uses OLE automation to provide non-ACT! applications with both control and context interrogation of the ACT! application.

III

ACT! Scripting Support

Describes how to create scripts that can be notified of events in the ACT! application.

IV

Adding Extensible Views and Tabs to ACT!

Describes how to add views, accessible by a Contact or Group tab or View command, to display HTML content within the ACT! application.

V

Adding Custom Commands to ACT!

Describes the ACT! OLE Command Object component of the ACT! SDK, which uses OLE automation to add custom commands to ACT! that execute external programs.

Appendix A

ACT! Database File Format Reference

Describes the file formats of ACT! database tables and relationships among ACT! tables.

Appendix B

ACT! Command ID Reference

Lists ACT! command IDs referenced in the ACT! Application Object and Adding Custom Commands to ACT! sections of the ACT! SDK.

The following sample files are included with the ACT! Software Development Kit (SDK).

·         Sample Microsoft Visual Basic and Visual C++ code files for the ACT! OLE Application Object and the ACT! OLE Database Object.

·         Sample control files for adding extensible views and tabs to the ACT! application.


 

Service and Support Solutions

The ACT! Software Development Kit (SDK) offers two support options: “How Do I” support and Consulting services. For the latest information about support for the ACT! SDK, visit http://www.actsoftware.com/, click the Add Ons link, then click the Software Development Kit link.

To learn more about general ACT! Customer Service and Technical Support solutions, visit the web sites listed in the ACT! User’s Guide or choose Service and Support Information from the Help menu within ACT! See the back cover of the ACT! User’s Guide for general Customer Service and Technical Support telephone numbers.

“How-Do-I” support

“How-Do-I” Technical Support for the ACT! SDK is charged at $50 US per incident. An incident is defined as a question regarding one specific operation.

Please call (480) 444-1399 or (800) 927-3989 to leave a message for an ACT! SDK specialist. Your call will be returned within two business days. “How-Do-I” support is available Monday through Friday, 6:00 a.m. to 5:00 p.m. Pacific Standard Time.

Consulting Services

Users of the ACT! SDK are also entitled to code debugging services. These services are charged at $100 US per hour. These services cover errors encountered during use of the ACT! SDK.

Please call(480) 444-1399 or (800) 927-3989 to leave a message for an ACT! SDK specialist. Your call will be returned within two business days. Consulting services are available Monday through Friday, 6:00 a.m. to 5:00 p.m. Pacific Standard Time.

Programming Services

Programming services are available from independent ACT! Certified Consultants. For a list of ACT! Certified Consultants, visit http://www.actsoftware.com/ then click the Certified Consultants link.

Every effort has been made to ensure the accuracy of this information. Interactive Commerce Corporation reserves the right to limit any single support call, change the terms and conditions of support, and change support pricing and service availability without notice.


I


ACT! Software Development Kit (SDK)
Technical Reference Guide

ACT! OLE Database Object section

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Section I         ACT! OLE Database Object

Chapter 1       Getting Started with the OLE Database Object.......................................... 17

Conventions used in this section........................................................................... 17

Syntax conventions....................................................................................... 17

Terminology.................................................................................................. 18

Parameter types.................................................................................................. 18

Special data types............................................................................................... 19

Overview of the ACT! OLE Database Object........................................................... 21

Features and limitations of the ACT! OLE Database Object............................... 22

System requirements..................................................................................... 22

Development languages................................................................................. 22

Using the Database Object with Visual C++..................................................... 22

Understanding key files........................................................................................ 24

Using the type library........................................................................................... 25

ACT! Database Unique ID field considerations........................................................ 25

ACT! OLE Database Object definitions.................................................................. 26

ACT! OLE object model........................................................................................ 27

What’s new......................................................................................................... 28

Changes for ACT! 3.0.6.................................................................................. 28

Changes for ACT! 3.0.7.................................................................................. 29

Changes for ACT! 4.0..................................................................................... 29

Changes for ACT! 4.0.2.................................................................................. 30

Changes for ACT! 2000.................................................................................. 30

Chapter 2       Using Database Object Properties and Methods...................................... 33

Common properties and methods.......................................................................... 34

Add Method.................................................................................................. 38

Close Method................................................................................................ 39

Data Property................................................................................................ 39

Delete Method............................................................................................... 40

Edit Method.................................................................................................. 41

Error Property............................................................................................... 41

Execute Method............................................................................................ 42

FieldCount Property....................................................................................... 42

Fields Property.............................................................................................. 43

FindDuplicates Method (requires ACT! 2000 or later)......................................... 43

GetDataEx Method (requires ACT! 4.0.2 or later).............................................. 44

GetDuplicateCriteria Method (requires ACT! 2000 or later)................................. 46

GetSort Method (requires ACT! 4.0 or later)...................................................... 47

GoTo Method................................................................................................ 48

IsBOF Property............................................................................................. 48

IsEOF Property............................................................................................. 49

IsLocked Property......................................................................................... 49

IsOpen Property............................................................................................ 49

Jump Method................................................................................................ 50

LastError Property......................................................................................... 50

LockLevel Property........................................................................................ 51

Lookup Method............................................................................................. 51

LookupKeyword Method................................................................................. 52

MoveFirst Method.......................................................................................... 53

MoveLast Method.......................................................................................... 53

MoveNext Method.......................................................................................... 53

MovePrevious Method.................................................................................... 54

Name Property.............................................................................................. 54

Position Property........................................................................................... 54

Query Property.............................................................................................. 55

Rebuild Method............................................................................................. 55

RecordCount Property.................................................................................... 55

SetDataEx Method (requires ACT! 4.0.2 or later).............................................. 56

SetDuplicateCriteria Method (requires ACT! 2000 or later).................................. 57

Sort Method.................................................................................................. 58

Update Method.............................................................................................. 59

Activity object properties and methods.................................................................. 60

Clear Method................................................................................................ 62

ClearClearedFilter Method.............................................................................. 62

ClearContactScope Method............................................................................ 62

ClearDateScope Method................................................................................ 63

ClearGroupScope Method.............................................................................. 63

ClearPriorityFilter Method............................................................................... 63

ClearRecurring Method................................................................................... 64

ClearTimedFilter Method................................................................................ 64

ClearTimelessFilter Method............................................................................ 64

ClearTypeFilter Method.................................................................................. 65

ClearUnclearedFilter Method........................................................................... 65

ExceptionInfo Property................................................................................... 65

FirstScheduledWith Property.......................................................................... 66

GetDaysOfMonthBits Method......................................................................... 67

GetDaysOfWeekBits Method.......................................................................... 68

GetRecurringFrequency Method...................................................................... 69

GetRecurringUntilDate Method........................................................................ 70

GetWeeksOfMonthBits Method...................................................................... 71

HasAlarm Method.......................................................................................... 72

HasDetails Method (requires ACT! 2000 or later)............................................... 72

IsClear Method.............................................................................................. 73

IsOutlookActivity Method (requires ACT! 2000 or later)...................................... 73

IsRecurring Method........................................................................................ 74

IsTimeless Method........................................................................................ 74

NextScheduledWith Property (requires ACT! 4.0 or later)................................... 75

RecurringChangeMode Property...................................................................... 76

recurringType Property................................................................................... 76

SetClearedFilter Method................................................................................. 77

SetContactScope Method.............................................................................. 77

SetDateScope Method................................................................................... 78

SetGroupScope Method................................................................................. 79

SetPriorityFilter Method................................................................................. 79

SetRecurringDays Method.............................................................................. 80

SetRecurringDaysAndWeeksofMonth Method.................................................. 80

SetRecurringWeekDays Method..................................................................... 82

SetTimedFilter Method................................................................................... 83

SetTimeless Method...................................................................................... 83

SetTimelessFilter Method............................................................................... 83

SetTypeFilter Method..................................................................................... 84

SetUnclearedFilter Method............................................................................. 84

Unclear Method............................................................................................. 85

Contact object methods....................................................................................... 86

LoadLookUpQuery Method (requires ACT! 3.0.6 or later)................................... 86

LookupMyRecord Method (requires ACT! 2000 or later)..................................... 86

SetAsMyRecord Method (requires ACT! 4.0 or later)......................................... 87

Database object properties and methods............................................................... 89

ActiveUserCount Property.............................................................................. 91

Activity Property............................................................................................ 91

ActVersion Method (requires ACT! 3.0.6 or later).............................................. 92

BeginBatchInsert Method (requires ACT! 4.0.2 or later)..................................... 92

BeginBatchUpdate Method (requires ACT! 4.0.2 or later)................................... 93

Close Method................................................................................................ 95

Contact Property........................................................................................... 95

CurrentUser Property..................................................................................... 95

DatabaseVersion Method (requires ACT! 4.0 or later)........................................ 96

Email Property.............................................................................................. 96

EndBatchInsert Method (requires ACT! 4.0.2 or later)........................................ 97

EndBatchUpdate Method (requires ACT! 4.0.2 or later)...................................... 97

GetDatabasePath Method (requires ACT! 4.0 or later)....................................... 97

GetTableId Method (requires ACT! 3.0.6 or later)............................................... 98

GetTableNameFromId Method (requires ACT! 3.0.6 or later)............................... 99

GetTableNameFromIndex Method (requires ACT! 3.0.6 or later)......................... 99

GetUniqueId Method.................................................................................... 100

Group Property............................................................................................ 100

IsInBatchMode Property (requires ACT! 4.0.2 or later)..................................... 100

IsLocked Property (requires ACT! 4.0.2 or later).............................................. 101

IsMultiUser Property.................................................................................... 101

IsOpen Property.......................................................................................... 101

IsOpening Property...................................................................................... 102

Lock Method (requires ACT! 4.0.2 or later)..................................................... 102

LogTransactions Property............................................................................. 103

MajorVersion Property.................................................................................. 103

MinorVersion Property.................................................................................. 104

Name Property............................................................................................ 104

NoteHistory Property.................................................................................... 104

Open Method.............................................................................................. 105

OpenEx Method (requires ACT! 4.0 or later)................................................... 105

PhoneFormatting Property............................................................................ 106

Relations Property (requires ACT! 3.0.6 or later)............................................. 106

TableCount Method (requires ACT! 3.0.6 or later)............................................ 107

Unlock Method (requires ACT! 4.0.2 or later).................................................. 107

Users Property............................................................................................ 107

ValidateUser Method.................................................................................... 108

Version Property (requires ACT! 3.0.6 or later)................................................ 109

Email object methods........................................................................................ 110

ClearContactScope Method (requires ACT! 3.0.7 or later)................................ 110

SetContactScope Method (requires ACT! 3.0.7 or later)................................... 110

ExceptionInfo object properties and methods........................................................ 112

Add Method................................................................................................ 112

Clear Method............................................................................................... 113

Count Property............................................................................................ 113

Remove Method........................................................................................... 113

Seek Method............................................................................................... 114

Value Method.............................................................................................. 114

Fields object properties and methods.................................................................. 115

AutoPopulate Property (requires ACT! 2000 or later)........................................ 116

BeginBatch Method (requires ACT! 4.0.2 or later)............................................ 117

Count Property............................................................................................ 118

DecimalPlaces Property............................................................................... 119

EndBatch Method (requires ACT! 4.0.2 or later).............................................. 119

EntryRule Property (requires ACT! 4.0.2 or later)............................................. 119

EntryTrigger Property................................................................................... 120

Exists Property........................................................................................... 121

ExitTrigger Property..................................................................................... 121

FieldId Property (requires ACT! 3.0.7 or later)................................................. 122

FieldIdAt Property (requires ACT! 3.0.6 or later).............................................. 122

Flags Property............................................................................................. 123

GetLinkToList Method (requires ACT! 2000 or later)......................................... 123

HasPopupList Property................................................................................ 124

Id Property.................................................................................................. 125

InitialValue Property..................................................................................... 125

IsBlockSync Property.................................................................................. 125

IsCutHistory Property................................................................................... 126

IsIndexed Property....................................................................................... 126

IsPrimary Property....................................................................................... 127

IsSortable Property...................................................................................... 127

Label Property............................................................................................. 128

Length Property........................................................................................... 128

Modifiable Property...................................................................................... 129

POPUPINFO Property.................................................................................. 129

SetLinkToList Method (requires ACT! 2000 or later)......................................... 130

Type Property.............................................................................................. 131

UnLinkLists Method (requires ACT! 2000 or later)............................................ 132

Group object properties and methods.................................................................. 134

AddContact Method..................................................................................... 135

AddSubGroup Method (requires ACT! 2000 or later)........................................ 135

AssignParent Method (requires ACT! 2000 or later)......................................... 136

ChangeToParentGroup Method (requires ACT! 2000 or later)............................ 137

ChangeToSubGroup Method (requires ACT! 2000 or later)................................ 137

ClearContactScope Method (requires ACT! 3.0.7 or later)................................ 138

ContactCount Property................................................................................. 138

GetParent Method (requires ACT! 2000 or later).............................................. 139

GetSubGroup Method (requires ACT! 2000 or later)......................................... 139

GetSubGroupCount Method (requires ACT! 2000 or later)................................ 140

GetSubGroupList Method (requires ACT! 2000 or later).................................... 141

GroupType Method (requires ACT! 2000 or later)............................................. 142

Members Property....................................................................................... 143

RemoveContact Method............................................................................... 143

SetContactScope Method (requires ACT! 3.0.7 or later)................................... 143

ListTable object methods.................................................................................... 145

ClearScope Method (requires ACT! 2000 or later)............................................ 145

GetScope Method (requires ACT! 2000 or later).............................................. 146

SetScope Method (requires ACT! 2000 or later).............................................. 146

Members object properties................................................................................. 148

Name Property............................................................................................ 149

UniqueId Property........................................................................................ 149

NoteHistory object methods................................................................................ 150

History types............................................................................................... 150

ClearAttachmentFilter Method....................................................................... 152

ClearContactScope Method.......................................................................... 152

ClearGroupScope Method............................................................................. 152

ClearHistoryFilter Method............................................................................. 153

ClearNoteFilter Method................................................................................. 153

SetAttachmentFilter Method......................................................................... 153

SetContactScope Method............................................................................. 154

SetGroupScope Method............................................................................... 154

SetHistoryFilter Method................................................................................ 155

SetNoteFilter Method................................................................................... 155

PopupInfo object properties and methods............................................................. 156

Add Method................................................................................................ 156

Clear Method............................................................................................... 157

PopupCount Property................................................................................... 157

Remark Method........................................................................................... 158

Remove Method........................................................................................... 158

Value Method.............................................................................................. 158

Relations object properties and methods.............................................................. 160

Count Property (requires ACT! 3.0.6 or later).................................................. 161

GetColumn1ID Method (requires ACT! 3.0.6 or later)....................................... 162

GetColumn2ID Method (requires ACT! 3.0.6 or later)....................................... 162

GetRelationType Method.............................................................................. 162

GetTable1ID Method (requires ACT! 3.0.6 or later)........................................... 163

GetTable2ID Method (requires ACT! 3.0.6 or later)........................................... 163

UsesRelationTable Method (requires ACT! 3.0.6 or later)................................. 163

Sales object methods........................................................................................ 165

AssociateWithContact Method (requires ACT! 2000 or later)............................ 165

AssociateWithGroup Method (requires ACT! 2000 or later)............................... 166

CompleteSale Method (requires ACT! 2000 or later)........................................ 167

ReopenSale Method (requires ACT! 2000 or later)........................................... 168

Users object properties and methods................................................................... 170

Access Property.......................................................................................... 171

AddUser Method (requires ACT! 4.0 or later)................................................... 171

CheckIsPhonebook Method (requires ACT! 4.0 or later)................................... 173

Count Property............................................................................................ 174

CurrentUserAccess Method (requires ACT! 3.0.6 or later)................................ 174

CurrentUserId Method (requires ACT! 3.0.6 or later)......................................... 174

CurrentUserName Method (requires ACT! 3.0.6 or later)................................... 175

CurrentUserSecurity Method (requires ACT! 3.0.6 or later)............................... 175

Exists Property........................................................................................... 176

GetPassword Method (requires ACT! 4.0 or later)............................................ 176

IsValidPassword Method.............................................................................. 177

Name Property............................................................................................ 177

Security Property......................................................................................... 178

SetAsPhonebook Method (requires ACT! 4.0 or later)...................................... 178

SetPassword Method................................................................................... 179

UniqueId Property........................................................................................ 179

Chapter 3       OLE Database Object Error Codes........................................................... 181


CHAPTER

Getting Started with the OLE Database Object

This section consists of three chapters that describe the ACT!TM OLE Database Object component of the ACT! Software Development Kit (SDK). It is written for programmers who want to use the ACT! OLE Database Object to build applications that can interact with an ACT! database.

To use this section, you need to be familiar with and using the following:

·         ACT! for Windows, version 3.0.3 or later

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

·         Microsoft Visual Basic, version 4.0 or later, or Microsoft Visual C++ 4.0 or later

Microsoft Visual Basic for Applications can be used as an alternative development language to access data in Microsoft Access and Excel versions in Microsoft Office 95, and Microsoft Access, Excel and Word versions in Microsoft Office 97 through Office 2000.

Conventions used in this section

This section provides syntax conventions and terminology used in this section.

Syntax conventions

bold                                   Command names, function names, properties, methods, and other text you need to type are shown in bold.

ALL CAPITALS                File names and messages are shown in all CAPITAL letters.

Courier                          Example code is shown in a monospaced Courier font. Comments in the code are preceded by an apostrophe ('Comment). If a line of code does not fit on a single line of the page, the remaining code is indented on the next line. Code examples are not case sensitive.

italic                                  Parameters, return variables, data structure names and text that represent the type of text to be entered rather than a literal series of characters are shown in italic.

[brackets]                          Optional items in syntax statements are enclosed in brackets ([ ]). For example, [password] indicates that a password can be used with the command, but is not required. In commands, include the information within the brackets, without the brackets.

Parameter1|Parameter2     Parameters are separated by a vertical bar (|) to indicate a mandatory choice between two items. Only one of the items can be specified.

Items that you can repeat are indicated by an ellipsis (… ) For example, devicename [...] indicates that you can optionally specify more than one device, separating the device names with a space.

Terminology

ACT! database                   The term database, in relation to an ACT! database, refers to the set of tables and their associated indexes in an ACT! database.

Table                                  The term table refers to a specific table in an ACT! database.

Parameter types

The following table lists the data types that are referenced in this section. Parameter names follow Hungarian notation, beginning with a lowercase letter or letters that indicate the data type.

Parameter syntax

Data type

date

Date and time in Short Date style and Time style from Windows Regional Settings (DATE in Visual C++)

iParameter

Short integer

lParameter

Long integer

szString

String, terminated by a null character (BSTR in Visual C++)

True|False

Boolean

vParameter

Variant (VARIANT in Visual C++)

Special data types

This section describes the format for date and time values and phone numbers used by the OLE Database Object, which is different from the native format used to store this information in an ACT! database.

Date and time formats

The OLE Database Object gets and returns date and time values formatted according to Windows Regional Settings Short Date style and Time style.

Using the regional settings for the United States, for example, the date and time is formatted as follows:

M/d/yy h:mm:ss tt          example: 8/19/97 6:28:29 PM

Using the regional settings for Australia, for example, the date and time is formatted as follows:

d/MM/yy H:mm:ss         example: 19/08/97 18:28:29

Date and time field values must be in the following ranges:

Portion

Description

Range

yyyy

Year

1970 - 2038

MM

Month (January = 01)

01 - 12

dd

Day

01 - 31

hh

Hours after midnight

00 - 23

mm

Minutes after hour

00 - 59

ss

Seconds after minute

00 - 59

Phone formats

The OLE Database Object returns phone numbers in the default of the canonical address format, or formatted as displayed in the ACT! application, depending on the value set by the PhoneFormatting property of the Database object.

When setting data in a phone field, the OLE Database Object accepts only a TAPI canonical-formatted phone number.

A canonical address is an ASCII string with the following structure:

+CountryCode space [(AreaCode) space] SubscriberNumber

The phone number string is continuous with the exception of exactly one space after CountryCode and exactly one space after the optional AreaCode.

+                               ASCII Hex (2B). Indicates that the number that follows uses the canonical format.

CountryCode            A variable length string containing only the digits 0-9. It identifies the country in which the address is located.

space                         Exactly one ASCII space character (0x20). The space is used to delimit the end of the CountryCode part of an address.

[(AreaCode) space]   A variable length string containing only the digits 0-9. The optional AreaCode is the area code part of the address. If present, it must enclosed in parentheses and followed by a space as a delimiter.

SubscriberNumber    A variable length string containing the digits 0-9 and formatting characters, including any of the following dialing control characters:

AaBbCcDdPpTtWw*#!,@$?

The subscriber number cannot contain the left parenthesis or right parenthesis character (which is used only to delimit the area code), and cannot contain the “|”, “^”, or CRLF characters, which are used to begin the following fields. Most non-digit characters in the subscriber number are spaces, periods (“.”), and dashes (“-”).

The following is an example of an Australian phone number in TAPI canonical format, with a breakdown of its different parts:

   +61 (3) 8236887

Country Code                61 (Australia)
Area Code                    3
Subscriber Number        8236887

For a complete list of country codes and default formats look at the PHONE.FMT file. This file is installed in the ACT folder.

Caution: Do not modify the PHONE.FMT file.

Overview of the ACT! OLE Database Object

Developers can access and manipulate ACT! data using the ACT! OLE Database Object. The primary function of the OLE Database Object is to allow non-ACT! applications to open and access an ACT! database. The design of the OLE Database Object helps maintain the integrity of the ACT! database, including its indexes and tables, when a foreign application accesses it. It also allows for simultaneous access to the ACT! databases by foreign applications while ACT! has the database open.

How can developers use an ACT! OLE Database Object?

The goal of the OLE Database Object is to allow developers to access an ACT! database for reading, changing, adding, and deleting data in an integral manner. Using the OLE Database Object ensures that when an ACT! database is accessed to read or change data, all default values and rules will operate, unless the defaults are intentionally overwritten. Also, the OLE Database Object provides developers with a set of tools in the form of OLE automation objects with associated methods and properties.

Note: Direct access to ACT! databases via other application drivers or direct manipulation performed inside foreign applications is not documented or supported and is highly discouraged.

How does the OLE Database Object affect the ACT! user interface?

This object provides only for data access and has no links to the ACT! user interface in the OLE Database Object. ACT! user interface access is provided by the ACT! OLE Application Object. You may notice, however, that if you have a foreign program that uses the OLE Database Object to add data, the ACT! UI can detect the update in its views if that database is open.

Note: The OLE Database Object requires the proper version of ACT! be installed on the user’s system.

Is the OLE Database Object a database tool for developing applications that can access ACT! data?

YES! The OLE Database Object is a set of interfaces and other tools for building applications that can interact with an ACT! 3.0 or later database. OLE facilitates application integration by defining a set of standard interfaces (groupings of semantically related functions) through which one application accesses the services of another.

Features and limitations of the ACT! OLE Database Object

The OLE Database Object only works with 32-bit developer tools, such as Microsoft Visual Basic 4.0 or later, Microsoft Visual C++ 4.0 or later, or Microsoft Visual Basic for Applications.

The OLE Database Object provides the following functions:

·         The ability to open and close the database

·         Access to all data table objects

·         Table navigation methods

·         Table properties and field attributes

·         Field data retrieval and assignment

·         Lookups

·         Sorting

·         Support for multiple ACT! databases opened at the same time by a single OLE application

The OLE Database Object does not provide the following functions:

·         Creation of new databases

·         Scheduling an activity with more than one contact

System requirements

Before you use the ACT! OLE Database Object, you should have the following applications already installed on your computer:

·         ACT! for Windows, version 3.0.3 or later. We recommend using the latest update. To receive an update, choose ACT! Update from the Help menu.

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0.

Development languages

Many programmers who work with the OLE Database Object work with Microsoft Visual Basic. Hence, most of the examples in the documentation of the database object are designed for the Visual Basic programmer. However, a type library is supplied and consequently, the integrated development environment (IDE) of Microsoft Visual C++ can be used to automatically generate prototypes for the object methods.

Using the Database Object with Visual C++

The following basic steps can help you get started using ACT! automation libraries using Microsoft Visual C++ 4.0 or later and Microsoft Foundation Class (MFC) library. To use the OLE Database Object in an application written using Visual C++, you first need to first create a wrapper class around the OLE objects supported by the OLE Database Object.

To create a wrapper class:

1        Create a new MFC project and enable OLE automation.

2       Open the class wizard and click Add Class.

3       Select the From Type Library option.

4       When prompted for the name of the type-library, choose ACTOLE.TLB from the ACT! program files folder. The Confirm Classes dialog appears.

5       Click OK or select only those classes that you need, then click OK.

Visual C++ will automatically generate MFC wrapper classes for all methods and properties supported by the OLE Database Object.

For more information on how to use OLE automation in Visual C++, see Visual C++ online help.

Example VISUAL C++ code

IDatabase Database;

Database.CreateDispatch("ACTOLE.DATABASE", pException);

Database.Open("c:\\act\\database\\act5demo.dbf");

m_ListBox.ResetContent();

if( Database.GetIsOpen() )

{

   // Attach to the GROUP object.

   IGroup Group  ;

   LPDISPATCH groupDispatch = Database.GetGroup();

   Group.AttachDispatch(groupDispatch, TRUE);

   // Enumerate all of the GROUPS.

   Group.MoveFirst();

   while( !Group.GetIsEOF() )

   {

       CString szOutput;

       ConvertVariantToString( Group.GetData(GF_Name), szOutput);

          m_ListBox.AddString( szOutput );

       // If there are contacts for this group enumerate them.

       if( Group.GetContactCount() > 0 )

       {

          // Attach to the MEMBERS object.

          IMembers Members;

          LPDISPATCH membersDispatch = Group.GetMembers();

          Members.AttachDispatch(membersDispatch, TRUE);

              Members.MoveFirst();

          while( !Members.GetIsEOF() )

          {

              CString memberString;

              memberString.Format("--> %s", Members.GetName());

              m_ListBox.AddString(memberString);

              Members.MoveNext();

          }

       }

       Group.MoveNext();

   }

   Group.ReleaseDispatch();

   Database.Close();

   Database.ReleaseDispatch();

}

else

{     

   AfxMessageBox("database did not open");

}     

Note:   This example assumes that you are logging on to a single-user database.

Using properties in Visual C++

For each property, the ACT! Database Object creates corresponding sets of Get and Set methods in an MFC wrapper class. Read-only properties, however, have only a Get method. If you are using Visual C++, check the C++ header file generated by Visual C++ (ACTOLE.H) for the methods that correspond to properties documented in this manual.

The following table lists examples of properties and corresponding methods to use in Visual C++.

Property Name

Type

VISUAL C++ Method

Database.ActiveUserCount

Read Only

Database.GetActiveUserCount()

Activity.NextScheduledWith

Read/Write

Activity.GetNextScheduledWith()
(to get the value of the property)

Activity.SetNextScheduledWith()
(to get the value of the property)

Understanding key files

The following table lists key ACT! files used by the ACT! OLE Database Object. These files are stored in the ACT! program files folder.

File

Description

ACTOLE.DLL

OLE library containing the ACT! OLE Database Object.

ACTOLE.TLB

Type library that contains functions within the ACT! OLE Database Object. Methods contained in the type library need to be used directly by Visual C++ developers. In Visual Basic type library functions are handled automatically at run time.

ACTEVENT.OCX

OLE event notification control module, used by third-party applications for receiving event notification. An event is generated, for example, when the contact is changed in the Contact View.

ACTREG.EXE

The ACT! Windows registry update utility. This utility can be run manually if necessary to register ACT! OLE controls as a troubleshooting procedure.

Using the type library

Support is provided for ACT! 3.0, ACT! 4.0, and ACT! 2000 data access within a 32-bit development environment for ACT! 3.0 or later. The OLE Database Object (ACTOLE.DLL) is an OLE automation server with objects implemented as a Windows dynamic link library of methods and properties used to simplify communications between OLE programmable languages and an ACT! database. The object is a Visual C++ programmed module using internal buffers to move information to and from the database. If you add or change information, you will fill a buffer with the appropriate data, and then call a method to move the data into the ACT! database. If you request information from the OLE Database Object, buffered data will be returned to your client application. The ACTOLE.DLL makes calls into the ACT! database layer ADAL.DLL. The ACTOLE.DLL and type library ACTOLE.TLB are installed with the ACT! application and placed in the ACT folder.

The database object provided with ACT! 2000 is incompatible with the databases in ACT! 3.0 or ACT! 4.0 format. Before you use the ACT! 2000 database object, you must convert ACT! 3.0 and ACT! 4.0 databases into ACT! 2000 format.

ACT! Database Unique ID field considerations

ACT! database Unique ID field values are created by calculating a unique value, then modifying it to contain printable characters. The resulting value is a left-justified string, which is padded with enough trailing spaces to complete the 12 character fixed-length Unique ID field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Caution: Do not use the Visual Basic Trim function or any other method to trim the length of the Unique ID string, or the resulting Unique ID will be invalid.

ACT! OLE Database Object definitions

The ACT! OLE Database Object defines the following objects:

Object

Definition

Activity object

This object contains scheduled activity information for the active Database object.

Contact object

This object contains information about the ACT! contacts.

Database object

This is the OLE creatable object that contains the ACT! database information and objects. This is the programmable interface for Activity, Contact, Email, Group, and NoteHistory objects.

Email object

This object contains e-mail information for the active Database object.

ExceptionInfo object

This object contains the recurring exception information for a particular activity.

Fields object

This object contains the data properties for a specified ACT! field.

Group object

This object contains group and membership information for the active Database object.

ListTable object

This object contains product, product type, and main competitor data for use by the Sales object in ACT! 2000 or later.

Members object

This object contains membership information for the active Group object.

NoteHistory object

This object contains notes and historical information for the active Database object.

PopupInfo object

This object contains the popup information for a valid field.

Relations object

This object contains relational information between table objects of the active Database object.

Sales object

This object contains data for sales process management for the active Database object in ACT! 2000 or later.

Users object

This object contains the user information for the active Database object.

ACT! OLE object model

The following chart shows the relationships of objects in the ACT! OLE Database Object model:

 

 


What’s new

The ACT! OLE Database Object requires ACT! 3.0.3 or later. This section lists changes to the OLE Database Object for ACT! releases 3.0.6, 3.0.7, 4.0, 4.0.2, and 2000.

Changes for ACT! 3.0.6

The Relations object and the following properties and methods have been added for ACT! 3.0.6:

Object

New Properties

New Methods

Contact

 

LoadLookUpQuery

Database

Relations

ActVersion
GetTableId
GetTableNameFromId
GetTableNameFromIndex
TableCount
Version

Fields

FieldIdAt

 

Relations (new)

Count

GetColumn1ID
GetColumn2ID
GetRelationTable
GetRelationType
GetTable1ID
GetTable2ID
UsesRelationTable

Users

 

CurrentUserAccess
CurrentUserId
CurrentUserName
CurrentUserSecurity

Additional parameters have been documented for the following properties:

Object

Properties

Added parameters

ACT! database common objects

Data property
Query property

szValue (optional)
szString (optional)

Activity object

FirstScheduledWith property

szUniqueID (optional)

Database object

PhoneFormatting property

iValue (optional)

Fields object

DecimalPlaces property

iDecPlace (optional)

 

EntryTrigger property

szExecutableName (optional)

 

ExitTrigger property

szExecutableName (optional)

 

Flags property

lFlag (optional)

 

IsBlockSync property

True|False

 

Label property

szLabel (optional)

 

Type property

iType (optional)

Users object

Security property

lValue (optional)

Changes for ACT! 3.0.7

The following methods have been added to the ACT! OLE Database Object for ACT! 3.0.7:

Object

New Properties

New Methods

Email

 

ClearContactScope
SetContactScope

Fields

FieldId

 

Group

 

ClearContactScope
SetContactScope

Changes for ACT! 4.0

The following properties and methods have been added for ACT! 4.0:

Object

New Properties

New Methods

ACT! database common objects

 

GetSort

Activity

NextScheduledWith

 

Contact

 

SetAsMyRecord

Database

 

GetDatabasePath
DatabaseVersion
OpenEx

Users

 

AddUser
GetPassword
CheckIsPhonebook
SetAsPhonebook

Changes for ACT! 4.0.2

The following functions have been added to the ACT! OLE Database Object for ACT! 4.0.2:

·         Batch mode operations for faster import and update operations on locked ACT! databases.

·         Functions for getting and setting data to multiple fields in ACT! database tables in one operation.

·         Set function added to the IsCutHistory property of the Fields object.

The following properties and methods have been added for ACT! 4.0.2:

Object

New Properties

New Methods

ACT! database common objects

 

GetDataEx
SetDataEx

Database

IsInBatchMode
IsLocked

BeginBatchInsert
BeginBatchUpdate
EndBatchInsert
EndBatchUpdate
Lock
Unlock

Fields

EntryRule

BeginBatch
EndBatch

Changes for ACT! 2000

The following objects have been added for ACT! 2000:

·         ListTable object

·         Sales object

The following properties and methods have been added for ACT! 2000:

Object

New Properties

New Methods

ACT! database common objects

 

FindDuplicates
GetDuplicateCriteria
LookupKeyword
SetDuplicateCriteria

Activity

 

HasDetails
IsOutlookActivity

Contact

 

LookupMyRecord

Fields

AutoPopulate

GetLinkToList
SetDuplicateCriteria
SetLinkToList
UnLinkLists

Group

 

AddSubGroup
AssignParent
ChangeToParentGroup
ChangeToSubGroup
GetParent
GetSubGroup
GetSubGroupCount
GetSubGroupList
GroupType

ListTable

 

ClearScope
GetScope
SetScope

Sales

 

AssociateWithContact
AssociateWithGroup
CompleteSale
ReopenSale


CHAPTER

Using Database Object Properties and Methods

This chapter contains descriptions of the different properties and methods that apply to the various ACT! OLE database objects. The chapter is divided into sections devoted to the following ACT! Database Object properties and methods:

·         Common properties and methods applying to more than one object

·         Activity object properties and methods

·         Contact object methods

·         Database object properties and methods

·         Email object methods

·         ExceptionInfo object properties and methods

·         Fields object properties and methods

·         Group object properties and methods

·         ListTable object methods (require ACT! 2000 or later)

·         Members object properties

·         NoteHistory object methods

·         PopupInfo object properties and methods

·         Relations object properties and methods

·         Sales object methods (require ACT! 2000 or later)

·         Users object properties and methods

Most sections show a list of properties and a list of methods in table form (some have only one of each), followed by an alphabetized list combining these properties and methods, which supplies details and, in some cases, examples. “See also” cross references are provided that refer to other properties and methods within the same object unless another object is listed.

Common properties and methods

The following common properties and methods apply to more than one ACT! database object. The database objects the property or method applies to are listed in the following table.

Properties

Property name

Objects

Parameter(s)

Parameter type(s)

Value type

Access

Data

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

iFieldID
[, szValue]

Short Integer, String

Date/Variant

Read/Write

Error

Activity, Contact, Database, Email, ExceptionInfo, Fields, Group, ListTable, Members, NoteHistory, PopupInfo, Relations, Sales, Users

None

 

Boolean

Read Only

FieldCount

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Short Integer

Read Only

Fields

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Object/
LPDISPATCH

Read Only

IsBOF

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Boolean

Read Only

IsEOF

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Boolean

Read Only

IsLocked

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Boolean

Read Only

IsOpen

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Boolean

Read Only

LastError

Activity, Contact, Database, Email, ExceptionInfo, Fields, Group, ListTable, Members, NoteHistory, PopupInfo, Relations, Sales, Users

None

 

Short Integer

Read Only

LockLevel

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Short Integer

Read Only

Name

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

String

Read Only

Position

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Long Integer

Read Only

Query

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

szString

String

String

Read/Write

RecordCount

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Long Integer

Read Only

Methods

Method name

Objects

Parameter(s)

Parameter type(s)

Return type

Add

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Void

Close

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Void

Delete

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Void

Edit

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

Void

Execute

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

FindDuplicates

Contact, Group

None

 

Void

GetDataEx

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

iFieldArray, szValueArray

Short Integer,
String

Void

GetDuplicateCriteria

Contact, Group

iField1ID,
iField2ID,
iField3ID

Short Integer,
Short Integer,
Short Integer,

Short Integer

GetSort

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

iField1ID, iDirection1,
iField2ID, iDirection2,
iField3ID, iDirection3

Short Integer,
Short Integer,
Short Integer,
Short Integer,
Short Integer,
Short Integer

Short Integer

GoTo

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

szUniqueID

String

Void

Jump

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

lValue

Long Integer

Void

Lookup

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

iFieldID, szKeyword, iLookupType

Short Integer, String,
Short Integer

Void

LookupKeyword

Contact, Email, Group, NoteHistory

szKeyword

String

Void

MoveFirst

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

MoveLast

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

MoveNext

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

MovePrevious

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

Rebuild

Activity, Email, Group, ListTable, Members, NoteHistory, Sales

None

 

Void

SetDataEx

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

iFieldArray, szValueArray

Short Integer,
String

Void

SetDuplicateCriteria

Contact, Group

iFieldID1,
iFieldID2,
iFieldID3

Short Integer,
Short Integer,
Short Integer

Void

Sort

Activity, Contact, Email, Group, ListTable, Members, NoteHistory, Sales

iField1ID, iDirection1,
iField2ID, iDirection2,
iField3ID, iDirection3

Short Integer,
Short Integer,
Short Integer,
Short Integer,
Short Integer,
Short Integer

Void

Update

Activity, Contact, Email, Group, ListTable, NoteHistory, Sales

None

 

String

Add Method

Description    Adds a new record with default field values in the current object.

Note: Use the AddSubGroup method in the Group object to add a subgroup record.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Add

Comments     Creates a new record buffer with default field values so that field data can be assigned using the Data property. The new record is committed using the Update method or aborted if any record navigational method is called.

See also         Data, Delete, GoTo, Move…, Update
FirstScheduledWith, NextScheduledWith in Activity object

Example         'This example demonstrates how to add a new contact record.

 

dim objData as object

dim szUniqueId as string

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.CONTACT.Add

'Set field data

objData.CONTACT.Data CF_Company, "WhatCo"

objData.CONTACT.Data CF_Name, "Chris Huffman"

objData.CONTACT.Data CF_Address1, "20323 SomeWhere Avenue"

objData.CONTACT.Data CF_Title, "President"

 

'Update the records contents

szUniqueId = objData.CONTACT.Update

objData.Contact.GoTo (szUniqueId)

 

objData.Close

set objData = Nothing

Close Method

Description    Closes the current table. The table schema and record information is discarded.

Objects          Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Close

See also         IsOpen
Open in Database object

Data Property

Description    Gets and sets the data for a specified field in the specified object.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Data iFieldID [, szValue]

Parameters    iFieldID                 A short integer that specifies the unique field ID for the specified table. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[szValue]                A string that specifies the data to set for the specified field. Omit this optional parameter to get the data in the field.

Value type      Date/Variant, Read/Write

Comments     Make a call to Add or Edit before setting data to a field, while not making intervening navigational calls. Follow the Data assignment by Update to commit the data to disk. All field data is passed and retrieved in string format only. Use the Type property in the Fields object to get the required data type for the data.

See also         Add, Edit, FieldCount, IsBOF, IsEOF, RecordCount, Update
Type in Fields object

Example         'This example demonstrates how to retrieve data from a record.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

Dim tableObject As Object

Set tableObject = objData.CONTACT

 

tableObject.MoveFirst

 

'Get the name of the contact

dim strOutput as String

strOutput = tableObject.Data(CF_Name)

 

set tableObject = Nothing

 

objData.Close

set objData = Nothing

Delete Method

Description    Deletes the currently selected record.

Caution: This is a single step process that cannot be reversed. Before deleting a parent group record, delete its subgroup records.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Delete

Return type   Void

See also         Add, GoTo, IsLocked, LockLevel, Move…

Edit Method

Description    Prepares the current record for editing and applies a record lock.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Edit

Return type   Void

Comments     This method enables the current record buffer to be edited and sets default field values so that field data can then be assigned using the Data property. The edited record is committed using the Update method or aborted if any record navigational method is called. To make sure the edit will succeed, call IsLocked immediately before calling this method and LockLevel immediately after.

See also         Data, GoTo, IsLocked, LockLevel, Move…, Update

Example         'This example demonstrates how to edit an existing contact record.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.CONTACT.MoveFirst

objData.CONTACT.Edit

 

'Change the address

objData.CONTACT.Data CF_Address1, "20323 Somewhere Avenue"

 

'Update the records contents

objData.CONTACT.Update

 

objData.Close

set objData = Nothing

Error Property

Description    Returns the error status of True for the object after a call that generated an error. Returns False if no error was generated on the last call. The error status is set to False at the beginning of each operation. If an error status of True is returned, call LastError to get the error code. See the last chapter of this section for error code descriptions.

Objects          Activity, Contact, Database, Email, ExceptionInfo, Fields, Group, Members, NoteHistory, PopupInfo, Relations, Users
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Error

Value type      Boolean, Read Only

Comments     This status should be checked after any call is made that may generate an error. Otherwise, further errors may be propagated that will overwrite the failing process or a successful call will hide the error, because error status is reset to False at the beginning of each operation.

See also         LastError

Execute Method

Description    Executes a query that has been set by the Query property and clears any previous query.

Objects          Contact, Group
Also applies to Activity, Email, Members, and NoteHistory objects in ACT! 3.0.7 or later.
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Execute

Return type   Void

See also         Query

Example         'This example demonstrates how to use queries.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.CONTACT.Query = "CONTACT contains ""Smith"""

objData.CONTACT.Execute

 

'*** Can now retrieve data for record(s)

objData.Close

set objData = Nothing

FieldCount Property

Description    Returns the number of fields in the table object. Use this value to iterate through the Data property and Fields property.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.FieldCount

Value type      Short Integer, Read Only

See also         Data, IsBOF, IsEOF, RecordCount

Fields Property

Description    Returns a Fields object. The Fields object returned by this property is directly associated with its parent object. For example, if the parent object is Contact, then the Fields object is initialized with the fields for the Contact table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Fields

Value type      Object/LPDISPATCH, Read Only

See also         Fields object

Example         'This example demonstrates how to retrieve fields object from a list object.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Obtain the Fields object for the Contact object

dim fields as object

set fields = objData.CONTACT.FIELDS

 

objData.Close

set objData = Nothing

FindDuplicates Method (requires ACT! 2000 or later)

Description    Uses the duplicate checking criteria to search for duplicate contacts and groups in the Contact table or Group table. After executing this command, the Current lookup contains the duplicates.

Objects          Contact, Group

Syntax            object.FindDuplicates

Return type   Void

See also         GetDuplicateCriteria, SetDuplicateCriteria

Example         'The following code finds duplicates and then enumerates through the

'duplicate records.

 

Dim objDatabase as object

Set objDatabase= CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

'Assign the correct table object

Set objContact = objDatabase.Contact

If objDatabase.IsOpen Then

   'Find the duplicate contacts in this database

   objContact.FindDuplicates

   List1.AddItem objContact.recordCount & " duplicate contacts Found!"

 

   'Enumerate all the duplicates in the contact table

   objContact.MoveFirst

   While Not objContact.IsEOF

       List1.AddItem "CONTACT: " & objContact.Data(CF_Name)

       List1.AddItem "TITLE: " & objContact.Data(CF_Title)

       List1.AddItem "COMPANY: " & objContact.Data(CF_Company)

       List1.AddItem objContact.Data(CF_City) & ", " &

          objContact.Data(CF_State)

       objContact.MoveNext

   Wend

   Set objContact = Nothing

   objDatabase.close

End If

Set objDatabase = Nothing

GetDataEx Method (requires ACT! 4.0.2 or later)

Description    Returns an array of strings containing the data for each field specified in an array of fields.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.GetDataEx iFieldArray, szValueArray

Parameters    iFieldArray            Returns an array of short integers (or pointers to short integers in VISUAL C++) that represent the field IDs of fields for which to get the data contained in the fields.

szValueArray         Returns an array of strings (or BSTRs in VISUAL C++) for the data that is returned for the specified fields. The same number of elements must be specified for the iFieldArray and the szValueArray parameters.

Note: In Visual C++, use VARIANT.pparray instead of VARIANT.parray for pointers to elements in the array.

Return type   Void

See also         SetDataEx

Example         'This example demonstrates getting data from multiple fields and sending

'it to a file.

 

Dim NoteIdArray(10) As Integer

Dim OutputArray(10) As String

Dim objData As Object

Dim objNoteHistory As Object

Dim count As Double

Dim LastRecord As Long

Dim FileNum

 

NoteIdArray(0) = NHF_ContactId 'Field ID constant

NoteIdArray(1) = NHF_UserTime     'Include Actfield.bas

NoteIdArray(2) = NHF_Type

NoteIdArray(3) = NHF_Text

 

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

If objData.IsMultiUser Then

   objData.ValidateUser "Chris Huffman", ""

End If

If objData.IsOpen = False Then

   MsgBox "Failed to open database"

End If

 

Set objNoteHistory = objData.NoteHistory

LastRecord = objNoteHistory.recordcount

count = 1

'Get a free file number

FileNum = FreeFile

'Open GetNoteHistory.TXT for append

Open "GetNoteHistory.txt" For Append As FileNum

objNoteHistory.MoveFirst

 

Do While (count <= LastRecord)

 

   objNoteHistory.GetDataEx NoteIdArray, OutputArray

 

   Write #FileNum, OutputArray(0), OutputArray(1), OutputArray(2),

       OutputArray(3)

   count = count + 1

   objNoteHistory.MoveNext

   If objNoteHistory.IsEOF Then

       Exit Do

   End If

Loop

Close FileNum    'Close the file

Set objNoteHistory = Nothing      'Clean up

ObjData.Close

Set objData = Nothing

GetDuplicateCriteria Method (requires ACT! 2000 or later)

Description    Returns short integer values for the field IDs for the duplicate checking criteria for the Contact table or Group table.

Object            Contact, Group

Syntax            object.GetDuplicateCriteria (iFieldID1, iFieldID2, iFieldID3)

Parameters    iFieldID1               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID type for the first field for duplicate checking (find a match for data in this field).

iFieldID2               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID type for the second field for duplicate checking (then find a match for data in this field).

iFieldID3               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID type for the third field for duplicate checking (then find a match for data in this field).

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

See also         FindDuplicates , SetDuplicateCriteria

Example         Dim objDatabase as object

Set objDatabase = CreateObject("ACTOLE.DATABASE")      'Open the database

objDatabase.Open dbName

 

'Assign the correct table object

Set objContact = objDatabase.Contact

 

If objDatabase.IsOpen Then

   'Get the current duplicate criteria

objContact.GetDuplicateCriteria DupCriteria1, DupCriteria2,

   DupCriteria3

   List1.AddItem "Duplicate criteria is :  Match on   " & DupCriteria1 &

       " and then on  " & DupCriteria2 & "  and then on " & DupCriteria3

'Set the duplicate criteria as match on User1 then Department and then

'on Title

   objContact.SetDuplicateCriteria CF_User1, CF_Department, CF_Title

   Set objContact = Nothing

   objDatabase.close

End If

 

Set objDatabase = Nothing

GetSort Method (requires ACT! 4.0 or later)

Description    Returns short integer values for the field IDs and sort directions of the sorted fields for the active sort of an ACT! database table. A value of 0, 1, 2, or 3 is returned specifying the number of fields sorted for the table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.GetSort iField1ID, iDirection1, iField2ID, iDirection2, iField3ID, iDirection3

Parameters    iField1ID               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID for the first field in the sort order.

iDirection1            A short integer (or pointer to a short integer in VISUAL C++) that represents the sort direction for the first field. Values returned are 0 for ascending order or 1 for descending order.

iField2ID               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID for the second field in the sort order.

iDirection2            A short integer (or pointer to a short integer in VISUAL C++) that represents the sort direction for the second field. Values returned are 0 for ascending order or 1 for descending order.

iField3ID               A short integer (or pointer to a short integer in VISUAL C++) that represents the field ID for the third field in the sort order.

iDirection3            A short integer (or pointer to a short integer in VISUAL C++) that represents the sort direction for the third field. Values returned are 0 for ascending order or 1 for descending order.

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   Short Integer

See also         Sort
IsSortable in Fields object

Example         'This example gets the sorted fields in the contact table.

 

Dim i As Integer

Dim objDatabase as object

Dim iSortFld1, iSortFld2, iSortFld3 as integer

Dim iSortOrder1, iSortOrder2, iSortOrder3 as integer

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

'Assign the correct table object

Set objContact = objDatabase.CONTACT

   If objDatabase.IsOpen Then

       i = objContact.GetSort(iSortFld1, iSortOrder1, iSortFld2,

          iSortOrder2, iSortFld3, iSortOrder3)

       lstDisplay.AddItem "i = " & i & "  Sort Order = " & iSortFld1 &

          " ," & iSortOrder1 & " ," &  iSortFld2 & " ," & iSortOrder2 &

          " ," & iSortFld3 & " ," & iSortOrder3

       Set objContact = Nothing

       objDatabase.Close

   End If

Set objDatabase = Nothing

GoTo Method

Description    Goes to the specified record and makes it the current record, if it exists.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.GoTo szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of the record.

Return type   Void

See also         Data
UniqueID in Users object

IsBOF Property

Description    Returns True if the current record is the first record in the table or False if the current record is not the first record in the table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.IsBOF

Value type      Boolean, Read Only

See also         RecordCount

IsEOF Property

Description    Returns True if an attempt has been made to move past the last record in the table or False if the current record is not the last record in the table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.IsEOF

Value type      Boolean, Read Only

See also         RecordCount

IsLocked Property

Description    Returns True if the current record is locked or False if it is not locked. Call this property immediately before calling Edit to determine if the record can be edited.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.IsLocked

Value type      Boolean, Read Only

Comments     Use LockLevel to determine if the current record is unlocked or has been locked by the current user or by a network user.

See also         Add, GoTo, Edit, LockLevel, Move…

IsOpen Property

Description    Returns True if the current table object is open or False if it is not open. Call this property to determine if a database has been successfully opened.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.IsOpen

Value type      Boolean, Read Only

See also         Close,
Open in Database object

Jump Method

Description    Goes to a specified position within the table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Jump lValue

Parameters    lValue                    A long integer that specifies the new position in the list, in the range between 1 and RecordCount.

Return type   Void

See also         Position, RecordCount

Example         'This example demonstrates how to jump by position within a table.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Set the current position to the fifth record. assume there

'are more than 5 records.

objData.CONTACT.Jump 5

 

'Can now retrieve record

objData.Close

set objData = Nothing

LastError Property

Description    Returns the last error code for the object. This status should be checked if Error is True to determine the cause of the last error. After checking this property, the last error status is reset to Status_Success. See the last chapter of this section for error code descriptions.

Objects          Activity, Contact, Database, Email, ExceptionInfo, Fields, Group, Members, NoteHistory, PopupInfo, Relations, Users
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.LastError

Value type      Short Integer, Read Only

See also         Error

LockLevel Property

Description    Returns record lock status 0 if the current record is not locked, 1 if locked by the current user, or 2 if locked by a network user. Call this property after calling Edit to make sure the current user has the record lock.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.LockLevel

Value type      Short Integer, Read Only

See also         Add, Edit, GoTo, IsLocked, Move…

Lookup Method

Description    Performs a lookup for the specified keyword. The lookup is restricted to searching on one field in a table at a time. An error is generated if the specified field does not exist in the table.

Note: This method has been modified for the NoteHistory object in ACT! 4.0 or later to add the capability of searching for text in the Regarding field of Notes/History table records.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Lookup iFieldID, szKeyword, iLookupType

Parameters    iFieldID                 A short integer that specifies the field ID of the field on which the lookup will be performed. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szKeyword             A string that specifies the search criteria.

iLookupType          A short integer that specifies the type of lookup. Specify 1 to replace the lookup, 2 to add to the lookup, or 3 to narrow the lookup.

Return type   Void

Comments     Lookups are not exact searches. Instead, they treat the keyword like a Begins With style search. For example, if you specify the keyword “B” on the Contact field, the lookup will return all records whose Contact field begins with a B.

See also         Error, IsBOF, LastError, RecordCount

Example         'This example demonstrates how to perform a lookup on the contact table.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Perform Lookup - will return all records whose name begins with Chris

objData.CONTACT.Lookup CF_Name, "Chris", 1

 

objData.Close

set objData = Nothing

LookupKeyword Method

Description    Looks up the specified keyword and returns the records containing the keyword.

Objects          Contact, Email, Group, NoteHistory

Syntax            object.LookupKeyword szKeyword

Parameters    szKeyword             A string specifying the keyword.

Return type   Void

Example         'The following code does a keyword search for "SDK " and then enumerates

'through all the Contact records that meet this criteria.

 

Dim objDatabase as object

Set objDatabase= CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

'Assign the correct table object

Set objContact = objDatabase.Contact

If objDatabase.IsOpen Then

   'Look up all Contact records in which there is "SDK" in the

   'Contact table.

   objContact.lookupKeyword "SDK"

   List1.AddItem objContact.recordCount & "  contacts Found!"

 

   'Enumerate all the duplicates in the Contact table

   objContact.MoveFirst

   While Not objContact.IsEOF

       List1.AddItem "CONTACT: " & objContact.Data(CF_Name)

       List1.AddItem "TITLE: " & objContact.Data(CF_Title)

       List1.AddItem "COMPANY: " & objContact.Data(CF_Company)

       List1.AddItem objContact.Data(CF_City) & ", " &

          objContact.Data(CF_State)

       objContact.MoveNext

   Wend

   Set objContact = Nothing

   objDatabase.close

End If

 

Set objDatabase = Nothing

MoveFirst Method

Description    Goes to the first record in a table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.MoveFirst

Return type   Void

See also         RecordCount

MoveLast Method

Description    Goes to the last record in a table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.MoveLast

Return type   Void

See also         RecordCount

MoveNext Method

Description    Goes to the next record in the table. An error is not generated for an EOF condition. Call IsEOF after calling this method.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.MoveNext

Return type   Void

See also         IsEOF, MovePrevious, RecordCount

Example         tableObject.MoveNext

If tableObject.IsEOF Then

   MsgBox "End of table"

End If

MovePrevious Method

Description    Goes to the previous record in the table. An error is not generated for a BOF condition. Call IsBOF after calling this method.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.MovePrevious

Return type   Void

See also         IsBOF, MoveNext, RecordCount

Name Property

Description    Returns the name of the current table object. Use this property to determine which table is the current object.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Name

Value type      String, Read Only

Position Property

Description    Returns the current record position in a table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Position

Value type      Long Integer, Read Only

Query Property

Description    Gets and sets the string for an ACT! formatted query.

Objects          Activity, Contact, Email, Group, Members, and NoteHistory
 Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Query = "Contact Contains ""szString"""
or
object.Query = "Group Contains ""szString"""

Parameters    szString                  A string that specifies the query criteria.

Value type      String, Read/Write

Comments     Queries start by first resetting the scope to all records, then executing the query. After executing, a query returns a subset of records. To clear an existing query and reset the scope to all records, pass in an empty string, then call the Execute method. See the ACT! User’s Guide for information on the ACT! query language. You can also use the advanced Query Helper to create and test query strings. Unique ID type fields cannot be used in queries.

See also         Execute

Example         See the example for the Execute method in this section.

Rebuild Method

Description    Rebuilds a table, which reloads the table information. Rebuild a table after modifying the table definitions.

Objects          Activity, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Rebuild

Return type   Void

RecordCount Property

Description    Returns the number of records in a table.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.RecordCount

Value type      Long Integer, Read Only

SetDataEx Method (requires ACT! 4.0.2 or later)

Description    Sets specified values for each field specified in an array of fields.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.SetDataEx iFieldArray, szValueArray

Parameters    iFieldArray            An array of short integers (or pointers to short integers in VISUAL C++) that represent the field IDs of fields for which to set the specified data. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szValueArray         An array of strings (or BSTRs in VISUAL C++) for the data to set to the specified fields. The same number of elements must be specified for the iFieldArray and the szValueArray parameters.

Note: In Visual C++, use VARIANT.pparray instead of VARIANT.parray for pointers to elements in the array.

Return type   Void

See also         GetDataEx

Example         'This example demonstrates updating multiple fields in one operation.

 

Dim database As Object

Dim contact As Object

Dim fieldarray(2) As Integer  'Must be a short integer

Dim dataarray(2) As String    'Must be a string (BSTR)

 

'Open the currently open database.

Set database = CreateObject("actole.database") database.OpenEx ("")

Set contact = database.Contact contact.MoveFirst

 

'Each value in fieldarray must have a corresponding value in dataarray.

fieldarray(0) = 25

fieldarray(1) = 26

dataarray(0) = "Chris"

dataarray(1) = "13 East 54th Street"

 

'Start editing.

contact.Edit

'Set the data on the record.

contact.SetDataEx fieldarray, dataarray

'If there is not an error, update the record.

if contact.Error = FALSE then

contact.Update

End If

 

Set contact = Nothing

database.Close

Set database = Nothing

SetDuplicateCriteria Method (requires ACT! 2000 or later)

Description    Sets field IDs for the duplicate checking criteria for the Contact table or Group table.

Object            Contact, Group

Syntax            object.SetDuplicateCriteria (iFieldID1, iFieldID2, iFieldID3)

Parameters    iFieldID1               A short integer (or pointer to a short integer in VISUAL C++) specifying the field ID for the first field for duplicate checking (find a match for data in this field).

iFieldID2               A short integer (or pointer to a short integer in VISUAL C++) specifying the field ID for the second field for duplicate checking (then find a match for data in this field).

iFieldID3               A short integer (or pointer to a short integer in VISUAL C++) specifying the field ID for the third field for duplicate checking (then find a match for data in this field).

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   Void

See also         FindDuplicates, GetDuplicateCriteria

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

'Open the database

objDatabase.Open dbName

 

'Assign the correct table object

Set objContact = objDatabase.Contact

 

If objDatabase.IsOpen Then

   'Get the current duplicate criteria

   objContact.GetDuplicateCriteria DupCriteria1, DupCriteria2,

       DupCriteria3

   List1.AddItem "Duplicate criteria is :  Match on   " & DupCriteria1 &

       " and then on  " & DupCriteria2 & "  and then on " & DupCriteria3

 

   'Set the duplicate criteria as match on User1 then Department and then

       'on Title

       objContact.SetDuplicateCriteria CF_User1, CF_Department, CF_Title

 

       Set objContact = Nothing

       objDatabase.close

   End If

 

   Set objDatabase = Nothing

Sort Method

Description    Executes a sort on up to three fields in a table. Only one sort may be active at once. An error is generated if any of the specified fields do not exist in the table.

Note: Call fields.IsSortable to determine if a field can be sorted.

Objects          Activity, Contact, Email, Group, Members, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Sort iField1ID, iDirection1, iField2ID, iDirection2, iField3ID, iDirection3

Parameters    iField1ID               A short integer that specifies the field ID type for the field that specifies the first field in the sort order.

iDirection1            A short integer that specifies the sort direction for the first field. Specify a value of 0 for ascending order or 1 for descending order.

iField2ID               A short integer that specifies the field ID for the field that specifies the second field in the sort order. Specify 0 if you do not want to sort on this field.

iDirection2            A short integer that specifies the sort direction for the second field. Specify 0 for ascending order or 1 for descending order.

iField3ID               A short integer that specifies the field ID for the field that specifies the third field in the sort order. Specify 0 if you do not want to sort on this field.

iDirection3            A short integer that specifies the sort direction for the third field. Specify 0 for ascending order or 1 for descending order.

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   Void

See also         Error, GetSort, IsBOF, LastError, RecordCount
IsSortable in Fields object

Example         'This example demonstrates how to perform a sort on the contact table.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Set sort order for all 3 fields

objData.CONTACT.Sort CF_Company, 1, CF_Title, 1, CF_Name, 1

 

'Set sort order for only the 1st field

objData.CONTACT.Sort CF_Company, 1, 0, 1, 0, 1

 

objData.Close

set objData = Nothing

Update Method

Description    Saves a new or edited record to the table. This method returns a string that contains the Unique ID of the record that has just been added or updated.

Objects          Activity, Contact, Email, Group, NoteHistory
Also applies to ListTable and Sales objects in ACT! 2000 or later

Syntax            object.Update

Return type   String

Comments     Make a call to Add or Edit before calling this method. This method commits a newly created or edited record to disk and removes the record lock. After updating, the current record position is determined by the alphabetical sort order of the field. After updating or adding a new record, call GoTo szUniqueID, where szUniqueID is the Unique ID returned from this method.

See also         Add, Data, Edit, GoTo, Move…

Activity object properties and methods

The Activity object contains scheduled activity information for the active database object. The following properties and methods apply only to the Activity object. See “Common properties and methods” in this section for additional properties and methods that apply to the Activity object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

ExceptionInfo

None

 

Object/
LPDISPATCH

Read/Write

FirstScheduledWith

[szUniqueID]

String

String

Read/Write

NextScheduledWith

[szUniqueID]

String

String

Read/Write

RecurringChangeMode

[True|False]

Boolean

Boolean

Read/Write

recurringType

None

 

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Clear

None

 

Void

ClearClearedFilter

None

 

Void

ClearContactScope

None

 

Void

ClearDateScope

None

 

Void

ClearGroupScope

None

 

Void

ClearPriorityFilter

None

 

Void

ClearRecurring

None

 

Void

ClearTimedFilter

None

 

Void

ClearTimelessFilter

None

 

Void

ClearTypeFilter

None

 

Void

ClearUnclearedFilter

None

 

Void

GetDaysOfMonthBits

None

 

Long Integer

GetDaysOfWeekBits

None

 

Long Integer

GetRecurringFrequency

None

 

Short Integer

GetRecurringUntilDate

None

 

Date/Variant

GetWeeksOfMonthBits

None

 

Long Integer

HasAlarm

None

 

Boolean

HasDetails

None

 

Boolean

IsClear

None

 

Boolean

IsOutlookActivity

None

 

Boolean

IsRecurring

None

 

Boolean

IsTimeless

None

 

Boolean

SetClearedFilter

None

 

Void

SetContactScope

szUniqueID

String

Void

SetDateScope

startDate, endDate

Date, Date

Void

SetGroupScope

szGroupUniqueID

String

Void

SetPriorityFilter

iPriority

Short Integer

Void

SetRecurringDays

lFrequency, untilDate

Long Integer,
Date

Void

SetRecurringDaysAndWeeksofMonth

lFrequency, lDayBits, lWeekBits, untilDate

Long Integer,
Long Integer,
Long Integer,
Date

Void

SetRecurringWeekDays

lFrequency, lDayBits, untilDate

Long Integer,
Long Integer, Date

Void

SetTimedFilter

None

 

Void

SetTimeless

True|False

Boolean

Void

SetTimelessFilter

None

 

Void

SetTypeFilter

iType

Short Integer

Void

SetUnclearedFilter

None

 

Void

Unclear

None

 

Void

Clear Method

Description    Sets the status of the current activity to cleared.

Object            Activity

Syntax            object.Clear

Return type   Void

See also         IsClear

ClearClearedFilter Method

Description    Clears an existing cleared filter. Resets the current record position to the first record and rebuilds the list of activities, without applying the cleared filter.

Object            Activity

Syntax            object.ClearClearedFilter

Return type   Void

See also         SetClearedFilter

ClearContactScope Method

Description    Clears any existing contact scoping. Resets the current record position to the first record and rebuilds the list of activities, without applying contact scoping.

Object            Activity

Syntax            object.ClearContactScope

Return type   Void

See also         SetContactScope

ClearDateScope Method

Description    Clears any existing date scoping. Resets the current record position to the first record and rebuilds the list of activities, without applying date scoping.

Object            Activity

Syntax            object.ClearDateScope

Return type   Void

See also         SetDateScope

ClearGroupScope Method

Description    Clears any existing group scoping. Resets the current record position to the first record and rebuilds the list of activities, without applying group scoping.

Object            Activity

Syntax            object.ClearGroupScope

Return type   Void

See also         SetGroupScope

ClearPriorityFilter Method

Description    Clears all existing priority filters. Resets the current record position to the first record and rebuilds the list of activities, without applying any priority filter.

Object            Activity

Syntax            object.ClearPriorityFilter

Return type   Void

See also         SetPriorityFilter

ClearRecurring Method

Description    Changes the recurring status of an activity status to non-recurring, making a recurring activity non-recurring.

Object            Activity

Syntax            object.ClearRecurring

Return type   Void

See also         recurringType, SetRecurringDays, SetRecurringDaysAndWeeksofMonth, SetRecurringWeekDays

ClearTimedFilter Method

Description    Clears an existing timed filter and rebuilds a list of records that includes any timed activities.

Object            Activity

Syntax            object.ClearTimedFilter

Return type   Void

See also         SetTimedFilter

ClearTimelessFilter Method

Description    Clears an existing timeless filter and rebuilds a list of records that includes all timeless activities.

Object            Activity

Syntax            object.ClearTimelessFilter

Return type   Void

See also         SetTimelessFilter

ClearTypeFilter Method

Description    Clears all existing activity type filters and rebuilds a list of records that includes all activities, including activities with types that were previously filtered out.

Object            Activity

Syntax            object.ClearTypeFilter

Return type   Void

See also         SetTypeFilter

ClearUnclearedFilter Method

Description    Clears an existing uncleared filter and rebuilds a list of records that includes all activities including the uncleared activities that were previously filtered out.

Object            Activity

Syntax            object.ClearUnclearedFilter

Return type   Void

See also         SetUnclearedFilter

ExceptionInfo Property

Description    Returns an ExceptionInfo object for a recurring activity.

Object            Activity

Syntax            object.ExceptionInfo

Value type      Object/LPDISPATCH, Read/Write

FirstScheduledWith Property

Description    Returns or sets the Unique ID of a contact for a single activity that is scheduled with multiple contacts. You can use this property to add a contact to the list of contacts with whom an activity is scheduled. This is an important property as it makes ACT! display the activity in the Activities tab of the contact record.

Note: Do not call this property between the Add/Update or Edit/Update pairs.

Object            Activity

Syntax            object.FirstScheduledWith [szUniqueID]

Parameters    szUniqueID            A string that specifies the Unique ID of a contact to add for a scheduled activity. Omit this optional parameter to get the contact record’s Unique ID.

Value type      String, Read/Write

Comments     Use the FirstScheduledWith property to return or set the first contact for an activity, then use the NextScheduledWith property as many times as necessary to return or set each additional contact for the activity. When all contacts for the activity have been returned, a null string is returned.

See also         NextScheduledWith

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

dim contactUniqueID as string

objData.CONTACT.MoveFirst

contactUniqueID = objData.CONTACT.Data(CF_UniqueID)

 

'Example demonstrating how to determine the type of recurring activity

objData.ACTIVITY.MoveFirst

 

objData.ACTIVITY.Add

'Fill out Activity fields

dim uniqueID as string

uniqueID = objData.ACTIVITY.Update

 

'Go to the newly added record and specify the contact the activity is

'scheduled with

objData.ACTIVITY.GoTo(uniqueID)

objData.ACTIVITY.FirstScheduledWith(contactUniqueID)

 

objData.Close

set objData = Nothing

GetDaysOfMonthBits Method

Description    Returns a long integer that specifies the days of a month that are set for a recurring activity. To get valid results, call the recurringType property before calling this method. The returned value represents a value equivalent to 2^ (Day of the month –1).

Object            Activity

Syntax            object.GetDaysOfMonthBits

Return type   Long Integer

Comments     The following values for days of a month are returned by this method:

Value

Day of month

 

Value

Day of month

 

Value

Day of month

1

1

 

2048

12

 

2097152

22

2

2

 

4096

13

 

4194304

23

4

3

 

8192

14

 

8388608

24

8

4

 

16384

15

 

16777216

25

16

5

 

32768

16

 

33554432

26

32

6

 

65536

17

 

67108864

27

64

7

 

131072

18

 

134217728

28

128

8

 

262144

19

 

268435456

29

256

9

 

524288

20

 

536870912

30

512

10

 

1048576

21

 

1073741824

31

1024

11

 

 

 

 

 

 

See also         Recurring

Example         Dim objData As Object

Set objData = CreateObject("ACTOLE.DATABASE")

 

objData.Open dbName

List1.Clear

objdata.ACTIVITY.MoveFirst

 

If objdata.ACTIVITY.IsRecurring Then

   recurtype = objdata.ACTIVITY.recurringType

 

   If recurtype = recurring_daysofmonth Then

   Dim daysOfMonth as long

   daysOfMonth = objdata.ACTIVITY.GetDaysOfMonthBits()

 

   'Get the day of the month

       Dim i As Integer

       Dim dayvalue as long

       Dim outString as String

       For i = 0 To 30

          dayvalue = 2 ^ i

 

          If daysOfMonth And dayvalue Then

              outString = outString & (i + 1) & " "

          End If

       Next i

       'OutString now has the value of the day of the month

       '(number between 1 and 31)

       List1.AddItem "Days of the Month: " & outString

   End If

End If

GetDaysOfWeekBits Method

Description    Returns a long integer that specifies the days of the week that are set for a recurring activity. To get valid results, first call the recurringType property and check that the activity is a recurring_weekdays or a recurring_daysandweeksofmonth type.

Object            Activity

Syntax            object.GetDaysOfWeekBits

Return type   Long Integer

Comments     The returned long integer value must be ANDed with specific defines representing the week bit set.

The following values for days of a week are returned by this method:

Value

Day of week

 

Value

Day of week

1

Sunday

 

16

Thursday

2

Monday

 

32

Friday

4

Tuesday

 

64

Saturday

8

Wednesday

 

 

 

See also         GetDaysOfMonthBits, GetWeeksOfMonthBits

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Example demonstrating how to parse values returned from

'GetDaysOfWeekBits method

objData.ACTIVITY.MoveFirst

if objData.ACTIVITY.IsRecurring then

   recurtype = objdata.ACTIVITY.recurringType

 

   if recurtype = recurring_weekdays or recurtype =
recurring_daysandweeksofmonth then

       dim dayBits as long

       dayBits = objData.ACTIVITY.GetDaysOfWeekBits

 

       'Parse the day bits

       If dayBits And day_sunday Then

          'Sunday is set

       End If

 

       If dayBits And day_monday Then

          'Monday is set

       End If

   End if

End if

 

objData.Close

set objData = Nothing

GetRecurringFrequency Method

Description    Returns a short integer that specifies the frequency of a recurring activity.

Object            Activity

Syntax            object.GetRecurringFrequency

Return type   Short Integer

Comments     Verify that the current activity is recurring by calling IsRecurring. Also determine the type of recurring activity by calling recurringType. This indicates how to treat the value. For example, if recurringType is 2 and GetRecurringFrequency returns a value of 1, the activity is recurring every 1 week.

See also         IsRecurring, recurringType

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Example demonstrating how to determine the type of recurring activity

objData.ACTIVITY.MoveFirst

 

if objData.ACTIVITY.IsRecurring then

   dim outString as string

   outString = "Recurring every: "

   recurtype = objdata.ACTIVITY.recurringType

 

   select case recurtype

       case recurring_none

       case recurring_days

          'Daily recurring activity

          outString = outString & activity.GetRecurringFrequency()

              & " Days"

       case recurring_weekdays

          'Weekly recurring activity

          outString = outString & activity.GetRecurringFrequency()

              & " Weeks"

       case recurring_daysofmonth

          'Custom recurring activity

          outString = outString & activity.GetRecurringFrequency()

              & " Months"

       case recurring_daysandweeksofmonth

          'Monthly recurring activity

       outString = outString & activity.GetRecurringFrequency() & " Months"

   end select

end if

 

objData.Close

set objData = Nothing

GetRecurringUntilDate Method

Description    Returns the date on which the recurring activity will stop recurring. In Visual Basic you can Typecast it as a string.

Object            Activity

Syntax            object.GetRecurringUntilDate

Return type   Date/Variant

GetWeeksOfMonthBits Method

Description    Returns a long integer that specifies which weeks of the month are set for a recurring activity. To get valid results, call recurringType and check that this activity is a recurring_daysandweeksofmonth type.

Object            Activity

Syntax            object.GetWeeksOfMonthBits

Return type   Long Integer

Comments     The long integer value returned must be ANDed with specific defines representing which week bit is set.

The following values for weeks of a month are returned by this method:

Value

Week of month

 

Value

Week of month

1

one

 

8

four

2

two

 

16

last

4

three

 

 

 

See also         GetDaysOfWeekBits

Example         'This example demonstrates how to parse values returned from

'GetWeeksOfMonthBits method

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.ACTIVITY.MoveFirst

if objData.ACTIVITY.IsRecurring then

   recurtype = objdata.ACTIVITY.recurringType

 

   if recurtype = recurring_daysandweeksofmonth then

       dim weekBits as long

       weekBits = objData.ACTIVITY.GetWeeksOfMonthBits

 

       'Parse the weekbits

       If weeksBits And week_one Then

          'Week one is set

       End If

 

       If weekBits And week_two Then

          'Week two is set

       End If

   End if

End if

 

objData.Close

set objData = Nothing

HasAlarm Method

Description    Returns True if an alarm has been set for the current activity or False if an alarm has not been set. Call this method to determine if an activity currently has an alarm set.

Object            Activity

Syntax            object.HasAlarm

Return type   Boolean

Comments     This method cannot be used to set an alarm for an activity.

HasDetails Method (requires ACT! 2000 or later)

Description    Determines if the current activity has details associated with it. Returns True if the current activity includes details or False if the activity does not include details.

Object            Activity

Syntax            object.HasDetails

Return type   Boolean

Example         'The following code lists all the activities with details in the

'current database.

 

   Set objDatabase = CreateObject("ACTOLE.DATABASE")

   objDatabase.Open dbName

   Set objActivity = objDatabase.Activity

 

   If objDatabase.IsOpen Then

       'Enumerate all of the records in the Activity table.

       objActivity.MoveFirst

       While Not objActivity.IsEOF

          List1.AddItem "Regarding: " & objActivity.Data(AF_Regarding)

          List1.AddItem "Start Time: " & objActivity.Data(AF_StartTime)

          List1.AddItem "Duration: " & objActivity.Data(AF_Duration)

          If objActivity.HasDetails = True Then

              List1.AddItem "ACTIVITY Details: " &

                 objActivity.Data(AF_Details)

          End If

          objActivity.MoveNext

       Wend

       Set objActivity = Nothing

       objDatabase.close

   End If

 

Set objDatabase = Nothing

IsClear Method

Description    Returns True if the current activity has a status of cleared or False if the status is not cleared.

Object            Activity

Syntax            object.IsClear

Return type   Boolean

See also         Clear, Unclear

IsOutlookActivity Method (requires ACT! 2000 or later)

Description    Returns True if the current activity is an Outlook activity and False if it is not an Outlook activity.

Object            Activity

Syntax            object.IsOutlookActivity

Return type   Boolean

Example         'The following code lists all the activities in the current database

'that are Outlook Activities.

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

Set objActivity = objDatabase.ACTIVITY

 

If objDatabase.IsOpen Then

   'Enumerate all of the records in the Activity table.

   objActivity.MoveFirst

   While Not objActivity.IsEOF

       'If the current activity record is an Outlook activity list it.

       If objActivity.IsOutlookActivity = True then

          List1.AddItem "Regarding: " & objActivity.Data(AF_Regarding)

          List1.AddItem "Start Time: " & objActivity.Data(AF_StartTime)

          List1.AddItem "Duration: " & objActivity.Data(AF_Duration)

       End if

       objActivity.MoveNext

   Wend

   Set objActivity = Nothing

   objDatabase.close

End If

 

Set objDatabase = Nothing

IsRecurring Method

Description    Returns True if the current activity is recurring or False if it occurs only once. Call this method before obtaining any type of recurring information.

Object            Activity

Syntax            object.IsRecurring

Return type   Boolean

See also         recurringType

Example         See recurringType

IsTimeless Method

Description    Returns True if the status of the current activity is timeless or False if the activity has a starting time of day.

Object            Activity

Syntax            object.IsTimeless

Return type   Boolean

See also         SetTimeless

NextScheduledWith Property (requires ACT! 4.0 or later)

Description    Returns or sets the Unique ID of a contact for a single activity that is scheduled with multiple contacts. You can use this property to add a contact to the list of contacts with whom an activity is scheduled.

Note: Do not call this property between the Add/Update or Edit/Update pairs.

Object            Activity

Syntax            object.NextScheduledWith [szUniqueID]

Parameters    szUniqueID            A string that specifies the Unique ID of a contact to add for a scheduled activity. Omit this optional parameter to get the contact record’s Unique ID.

Value type      String, Read/Write

Comments     Use the FirstScheduledWith property to return or set the first contact for an activity, then use the NextScheduledWith property as many times as necessary to return or set each additional contact for the activity. When all contacts for the activity have been returned, a null string is returned.

See also         FirstScheduledWith

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

dim contactUniqueID as string

objData.CONTACT.MoveFirst

contactUniqueID = objData.CONTACT.Data(CF_UniqueID)

 

'Example demonstrating how to determine the type of recurring activity.

objData.ACTIVITY.MoveFirst

 

objData.ACTIVITY.Add

'Fill out activity fields

dim uniqueID as string

uniqueID = objData.ACTIVITY.Update

 

'Go to the newly added record and set the contact/activity relationship

objData.ACTIVITY.GoTo(uniqueID)

objData.ACTIVITY.FirstScheduledWith(contactUniqueID)

objData.ACTIVITY.NextScheduledWith(contactUniqueID1)

objData.ACTIVITY.NextScheduledWith(contactUniqueID2)

 

objData.Close

set objData = Nothing

RecurringChangeMode Property

Description    Gets and sets the change mode for a recurring activity. If True is set or returned, the change is to be applied for only the current instance of the recurring activity. If False is set or returned, the change is to be applied for all instances of the recurring activity.

Object            Activity

Syntax            object.RecurringChangeMode [True|False]

Parameters    [True|False]           Specify True to set the change mode to the current instance of the recurring activity or False to set the change mode to all instances of the recurring activity. Omit this optional parameter to get the change mode for the recurring activity.

Value type      Boolean, Read/Write

recurringType Property

Description    Returns the type of recurring activity. To get valid results, first verify that the activity is recurring by calling IsRecurring.

Object            Activity

Syntax            object.recurringType

Value type      Short Integer, Read Only

Comments     The following recurring type values are returned by this property:

Type

Description

0

Not recurring type

1

Daily recurring type

2

Weekly recurring type

3

Custom (days of the month) recurring type

4

Monthly recurring type

See also         IsRecurring

Example         'This example demonstrates how to determine the type of recurring activity.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

objData.ACTIVITY.MoveFirst

 

if objData.ACTIVITY.IsRecurring then

   recurtype = objdata.ACTIVITY.recurringType

   select case recurtype

       case recurring_none

       case recurring_days

          'Daily recurring activity

       case recurring_weekdays

          'Weekly recurring activity

       case recurring_daysofmonth

          'Custom recurring activity

      case recurring_daysandweeksofmonth

          'Monthly recurring activity

   end select

end if

 

objData.Close

set objData = Nothing

SetClearedFilter Method

Description    Narrows the current set of activity records by filtering out all cleared activities from the current set of records. The list of records is rebuilt and the current record position returns to the first record.

Object            Activity

Syntax            object.SetClearedFilter

Return type   Void

See also         ClearClearedFilter

SetContactScope Method

Description    Narrows the current set of activity records to those for the contact with the specified Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            Activity

Syntax            object.SetContactScope szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of a contact record.

Return type   Void

See also         ClearContactScope

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Get a contact record Unique ID

dim uniqueID as string

objData.CONTACT.MoveFirst

uniqueID = objData.CONTACT.DATA(CF_UniqueID)

 

'Apply contact scoping to the current list of activities

objData.ACTIVITY.MoveFirst

objData.ACTIVITY.SetContactScope(uniqueID)

 

objData.Close

set objData = Nothing

SetDateScope Method

Description    Narrows the current set of activity records to those within the specified start date and end date range. You can apply this scoping method along with other scoping methods and filters.

Object            Activity

Syntax            object.SetDateScope startDate, endDate

Parameters    startDate                A date value that specifies the beginning date of the activity date range, formatted in Windows Regional Settings Short Date style.

endDate                 A date value that specifies the ending date of the activity date range, formatted in Windows Regional Settings Short Date style.

Return type   Void

See also         ClearDateScope

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Locate all activity records that fall between these dates

objData.ACTIVITY.MoveFirst

objData.ACTIVITY.SetDateScope DateValue("01/15/97"), DateValue("03/01/97")

 

objData.Close

set objData = Nothing

SetGroupScope Method

Description    Narrows the current set of activity records to those for the group with the specified Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            Activity

Syntax            object.SetGroupScope szGroupUniqueID

Parameters    szGroupUniqueID A string that specifies the Unique ID of a group record.

Return type   Void

See also         ClearGroupScope

SetPriorityFilter Method

Description    Narrows the current set of activity records by filtering out all activity records with one or more specified priorities from the current set of records. The list of records is rebuilt, and the record position returns to the first record.

Object            Activity

Syntax            object.SetPriorityFilter iPriority

Parameters    iPriority                 A short integer that specifies the activity record priority type to filter out. Specify 0 to filter out high priority activities, 1 for medium priority activities, or 2 for low priority activities.

Return type   Void

Comments     To filter out activities with a second priority type, call this method again with another parameter value. You may want to filter out both low and medium priority activities, for example, which means you will be left with a list of only high priority activities.

See also         ClearPriorityFilter

SetRecurringDays Method

Description    Sets the current activity record to recurring with a recurring type of daily and specifies the date when the activity will end.

Note: Do not call this method between Add/Update and Edit/Update pairs.

Object            Activity

Syntax            object.SetRecurringDays lFrequency, untilDate

Parameters    lFrequency            A long integer that specifies every x days of the month, in the range of 1 to 31, depending on the number of days in the month.

untilDate                A date value that specifies the date when the recurring activity will end, formatted in Windows Regional Settings Short Date style. This value must be greater than the start date of the current activity.

Return type   Void

See also         recurringType, SetRecurringDaysAndWeeksofMonth, SetRecurringWeekDays

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

objData.ACTIVITY.MoveFirst

 

'Alter the activity so that it happens every 2 days until 3/26/99

objData.ACTIVITY.SetRecurringDays 2, DateValue("03/26/99")

 

objData.Close

set objData = Nothing

SetRecurringDaysAndWeeksofMonth Method

Description    Sets the current activity record to recurring with a recurring type of monthly (days and weeks of a month) and specifies the date when the activity will end. Values for both days of the week bits and weeks of the month bits must be passed to this method.

Note: Do not call this method between Add/Update and Edit/Update pairs.

Object            Activity

Syntax            object.SetRecurringDaysAndWeeksofMonth lFrequency, lDayBits, lWeekBits, untilDate

Parameters    lFrequency            A long integer that species every x months, in a range of 1 to 60.

lDayBits                 A long integer that specifies the days of the week. This value is created by ORing together values that represent the days of the week.

                              The following table lists the values for each day of a week:

Value

Day of week

 

Value

Day of week

1

Sunday

 

16

Thursday

2

Monday

 

32

Friday

4

Tuesday

 

64

Saturday

8

Wednesday

 

 

 

                        lWeekBits               A long integer that specifies the weeks of the month. This value is created by ORing together values that represent the weeks of the month.

The following table lists the values for each week of a month:

Value

Week of month

 

Value

Week of month

1

one

 

8

four

2

two

 

16

last

4

three

 

 

 

                        untilDate                A date value that specifies the date when the recurring activity will end, formatted in Windows Regional Settings Short Date style. This value must be greater than the start date of the current activity.

Return type   Void

See also         recurringType, SetRecurringDays, SetRecurringWeekDays

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.ACTIVITY.MoveFirst

 

'Alter the activity so that it happens every one month on Sunday

'and on Thursday of the second and fourth weeks of the month up until

'the date 3/26/99

dim dayBits as long

dim weekBits as long

dayBits = day_sunday Or day_Thursday

weekBits = week_two Or week_four

objData.ACTIVITY.SetRecurringDaysAndWeeksofMonth 1 dayBits, weekbits,

   DateValue("03/26/99")

 

objData.Close

set objData = Nothing

SetRecurringWeekDays Method

Description    Sets the current activity record to recurring with a recurring type of weekly and specifies when the activity will end.

Note: Do not call this method between Add/Update and Edit/Update pairs.

Object            Activity

Syntax            object.SetRecurringWeekDays lFrequency, lDayBits, untilDate

Parameters    lFrequency            A long integer representing every x weeks, in the range of 1 to 52.

lDayBits                 A long integer representing the days of the week. This value is created by ORing together values which represent the days of the week.

                              The following table lists the values for each day of a week:

Value

Day of week

 

Value

Day of week

1

Sunday

 

16

Thursday

2

Monday

 

32

Friday

4

Tuesday

 

64

Saturday

8

Wednesday

 

 

 

                        untilDate                A date value that specifies the date when the recurring activity will end, formatted in Windows Regional Settings Short Date style. This value should be greater than the start date of the current activity.

Return type   Void

See also         recurringType, SetRecurringDays, SetRecurringDaysAndWeeksofMonth

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.ACTIVITY.MoveFirst

 

'Alter an activity that happens every 2 weeks on Sunday and Thursday and

'continues until 3/26/99

dim dayBits as long

dayBits = day_sunday Or day_thursday

objData.ACTIVITY.SetRecurringWeekDays 2, dayBits, DateValue("03/26/99")

 

objData.Close

set objData = Nothing

SetTimedFilter Method

Description    Narrows the current set of activity records by filtering out all timed activity records from the current set of records. The list of records is rebuilt, and the record position returns to the first record.

Object            Activity

Syntax            object.SetTimedFilter

Return type   Void

See also         ClearTimedFilter

SetTimeless Method

Description    Sets the current activity record’s activity status.

Object            Activity

Syntax            object.SetTimeless True|False

Parameters    True|False             Specify True to set the activity to timeless or False to set the activity to not timeless.

Return type   Void

See also         ClearTimelessFilter

SetTimelessFilter Method

Description    Narrows the current set of activity records by filtering out all timeless activities from the current set of records. The list of records is rebuilt, and the record position returns to the first record.

Object            Activity

Syntax            object.SetTimelessFilter

Return type   Void

See also         ClearTimelessFilter

SetTypeFilter Method

Description    Narrows the current set of activity records by filtering out all activity records with the specified type from the current set of records. The list of records is rebuilt, and the record position returns to the first record.

Object            Activity

Syntax            object.SetTypeFilter iType

Parameters    iType                      A short integer that specifies the type of activity records to filter out. Specify 0 to filter out Call type activities, 1 for Meeting type activities, or 2 for To-do type activities.

Return type   Void

Comments     To filter out activities with a second activity type, call this method again with another parameter value. You may want to filter out both Call and Meeting type activities, for example, which means you will be left with a list of only To-do type activities.

See also         ClearTypeFilter

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

objData.ACTIVITY.MoveFirst

 

'Filter out all calls from the Activity list

objData.ACTIVITY.SetTypeFilter(activitytype_call) 'defined in ACTFIELD.BAS

 

objData.Close

set objData = Nothing

SetUnclearedFilter Method

Description    Narrows the current set of activity records by filtering out all uncleared activity records from the current set of records. The list of records is rebuilt, and the record position returns to the first record.

Object            Activity

Syntax            object.SetUnclearedFilter

Return type   Void

See also         ClearUnclearedFilter

Unclear Method

Description    Resets the cleared status of the current activity record to uncleared.

Object            Activity

Syntax            object.Unclear

Return type   Void

See also         Clear

Contact object methods

The Contact object contains information about the ACT! contacts. The following methods apply only to the Contact object. See “Common properties and methods” in this section for additional properties and methods that apply to the Contact object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

LoadLookUpQuery

szFileName

String

Void

LookupMyRecord

None

 

Void

SetAsMyRecord

szUserName

String

Void

LoadLookUpQuery Method (requires ACT! 3.0.6 or later)

Description    Loads and runs a file that was created using the SaveCurrentLookup method of the ACT! OLE Application Object.

Note: This method cannot use queries created in the ACT! application.

Object            Contact

Syntax            object.LoadLookUpQuery szFileName

Parameters    szFileName            A string that specifies the name and path of the Query file.

Return type   Void

LookupMyRecord Method (requires ACT! 2000 or later)

Description    Looks up the My Record in the open database. After executing this command, the Current lookup contains one contact, the My Record.

Object            Contact

Syntax            object.LookupMyRecord

Return type   Void

Example         'The following code looks up the My Record and Lists the Name, Title, and

'Company information.

 

Set objData = CreateObject("ACTOLE.DATABASE")

'Opens the currently open database in ACT!

objData.OpenEx ""

 

Set objContact = objData.CONTACT

If objData.IsOpen Then

   'Lookup My Record and list the My Record information.

   objContact.LookupMyRecord

   List1.AddItem " My Record"

   List1.AddItem "NAME: " & objContact.Data(CF_Name)

   List1.AddItem "TITLE: " & objContact.Data(CF_Title)

   List1.AddItem "COMPANY: " & objContact.Data(CF_Company)

   Set objContact = Nothing

   objData.close

   List1.AddItem "Database Closed"

End If

 

Set objData = Nothing

SetAsMyRecord Method (requires ACT! 4.0 or later)

Description    Makes the current contact record the My Record of the specified user. To use this method, the current user of the open database and the specified user must have an Administrator security level. The specified user must not have an existing My Record in the open database. A contact record that was previously assigned to a user cannot be assigned to other users.

Object            Contact

Syntax            object.SetAsMyRecord szUserName

Parameters    szUserName           A string that specifies the user name.

Return type   Void

Example         'This example sets a contact record as the My Record for a user.

 

dim objDatabase as object

dim objContact as Object

dim objUsers as Object

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open(C:\My Documents\ACT\Database\ACT5demo.dbf)

Set objUsers = objDatabase.Users

 

'Add a user.

if objUsers.AddUser("Simon Lazarus", "password", 0) = True then

   'Get the Contact object.

   Set objContact = objDatabase.CONTACT

   objContact.Add

   objContact.Data (CF_Name, "Simon Lazarus")

   objContact.Data (CF_Company, "Aussie Meats")

   'Save the contact and get the Unique ID.

   objContact.Update

   'Mark the record as the My Record for user Simon Lazarus.

   objContact.SetAsMyRecord("Simon Lazarus")

Endif

 

objDatabase.Close

set objData = Nothing

Database object properties and methods

The Database object contains the ACT! database information and objects. The following properties and methods apply only to the Database object. See “Common properties and methods” in this section for additional properties that apply to the Database object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

ActiveUserCount

None

 

Short Integer

Read Only

Activity

None

 

Object/
LPDISPATCH

Read Only

Contact

None

 

Object/
LPDISPATCH

Read Only

CurrentUser

None

 

String

Read Only

Email

None

 

Object/
LPDISPATCH

Read Only

Group

None

 

Object/
LPDISPATCH

Read Only

IsInBatchMode

None

 

Boolean

Read Only

IsLocked

None

 

Boolean

Read Only

IsMultiUser

None

 

Boolean

Read Only

IsOpen

None

 

Boolean

Read Only

IsOpening

None

 

Boolean

Read Only

LogTransactions

[True|False]

Boolean

Boolean

Read/Write

MajorVersion

None

 

Short Integer

Read Only

MinorVersion

None

 

Short Integer

Read Only

Name

None

 

String

Read Only

NoteHistory

None

 

Object/
LPDISPATCH

Read Only

PhoneFormatting

[iValue]

Short Integer

Short Integer

Read/Write

Relations

None

 

Object/
LPDISPATCH

Read Only

Users

None

 

Object/
LPDISPATCH

Read Only

Version

None

 

String

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

ActVersion

None

 

String

BeginBatchInsert

None

 

Boolean

BeginBatchUpdate

iBatchFlag

Short Integer

Boolean

Close

None

 

Void

DatabaseVersion

None

 

String

EndBatchInsert

None

 

Boolean

EndBatchUpdate

None

 

Boolean

GetDatabasePath

None

 

String

GetTableId

iIndex

Short Integer

Short Integer

GetTableNameFromId

iTableID

Short Integer

String

GetTableNameFromIndex

iIndex

Short Integer

String

GetUniqueId

None

 

String

Lock

None

 

Boolean

Open

szDatabaseName

String

Void

OpenEx

szDatabaseName

String

Void

TableCount

None

 

Short Integer

Unlock

None

 

Boolean

ValidateUser

szUser [, szPassword]

String, String

Void

ActiveUserCount Property

Description    Returns the total number of local and remote users logged on to the current database, including the OLE automation client. This number changes as users log on and log off the database.

Object            Database

Syntax            object.ActiveUserCount

Value type      Short Integer, Read Only

See also         IsMultiUser, IsOpen,
Count in Users object

Activity Property

Description    Returns an Activity object. The Database object returns the same instance of the Activity object on each subsequent call.

Object            Database

Syntax            object.Activity

Value type      Object/LPDISPATCH, Read Only

See also         Activity Object

Example         'This example demonstrates how to retrieve an Activity object.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Obtain the Activity object

dim activity as object

set activity = objData.ACTIVITY

set activity = Nothing

 

objData.Close

set objData = Nothing

ActVersion Method (requires ACT! 3.0.6 or later)

Description    Returns a string that contains the version of ACT! used by the ACT! OLE Database Object. An example of a returned string is 3.0.6.123, where 3.0.6.123 is the version of ACT!

Object            Database

Syntax            object.ActVersion

Return type   String

See also         Version

BeginBatchInsert Method (requires ACT! 4.0.2 or later)

Description    Puts the current database in batch mode for insertion of new records. Call Lock to lock the current database before using this method. Returns True if batch mode was successfully started or False if batch mode was not started. Use the LastError property to get information on an error.

Object            Database

Syntax            object.BeginBatchInsert

Return type   Boolean

See also         BeginBatchUpdate, EndBatchInsert, EndBatchUpdate, IsInBatchMode, IsLocked, Lock, Unlock
LastError in common properties and methods

Example         'This example demonstrates batch mode record insertion on an ACT! database.

 

Dim objContact As Object

Dim dbAct as Object

Dim LoopCount as Integer

 

Set dbAct.CreateObject("actole.database")

dbAct.Open dbName

 

Set objContact = dbAct.CONTACT

 

If dbAct.lock = False Then

   MsgBox "Could not lock database. Aborting"

   Exit Sub

End If

 

If dbAct.IsLocked = False Then

   MsgBox "Could not lock database. Aborting"

   Exit Sub

End If

 

If dbAct.BeginBatchInsert = False then

   MsgBox "Could not turn on batch mode. Error was: " & dbAct.LastError

   Exit sub

End If

 

If dbAct.IsInBatchMode = False then

   MsgBox "Could not turn on batch mode. Error was: " & dbAct.LastError

   Exit sub

End If

 

'Update 100 records here.

for LoopCount = 1 to 100

   objContact.Add

   objContact.Data 26, "Contact "

   objContact.Data 25, "Contact Company "

   objContact.Update

Next LoopCount

 

If dbAct.Unlock = False Then

   MsgBox "Could not unlock database. Aborting"

   Exit Sub

End If

 

if dbAct.EndBatchInsert = FALSE then

   MsgBox "Could not unlock database. Error was: "& dbAct.LastError

   Exit Sub

End If

 

dbAct.Close

BeginBatchUpdate Method (requires ACT! 4.0.2 or later)

Description    Puts the current database in batch mode for updating existing records. Returns True if batch mode was successfully started or False if batch mode was not started. Use the LastError property to get information on an error.

Object            Database

Syntax            object.BeginBatchUpdate iBatchFlag

Parameters    iBatchFlag             A short integer that specifies the batch update mode. Specify 0 for batch updates to a locked database or 1 for batch updates to an unlocked database. Better performance is provided by performing batch updates to a locked database.

Caution: To perform batch updates to a locked database, use Lock to lock the database and IsLocked to verify that the database was locked before using this method.

Return type   Boolean

See also         BeginBatchInsert, EndBatchInsert, EndBatchUpdate, IsInBatchMode, IsLocked, Lock, Unlock
LastError in common properties and methods

Example         'This example demonstrates batch mode record update operations on an
'ACT! database.

 

Dim objContact As Object

Dim dbAct as Object

Dim LoopCount as Integer

Set dbAct.CreateObject("actole.database")

dbAct.Open dbName

 

Set objContact = dbAct.CONTACT

 

If dbAct.Lock = False Then

   MsgBox "Could not lock database. Aborting"

   Exit Sub

End If

 

If dbAct.IsLocked = False Then

   MsgBox "Could not lock database. Aborting"

   Exit Sub

End If

 

If dbAct.BeginBatchUpdate = False then

   MsgBox "Could not turn on batch mode. Error was: " & dbAct.LastError

   Exit Sub

End If

 

If dbAct.IsInBatch = False then

   MsgBox "Could not turn on batch mode. Error was: " & dbAct.LastError

   Exit Sub

End If

 

'Update 100 records here.

for LoopCount = 1 to 100

   objContact.Edit

   objContact.Data 26, "Contact "

   objContact.Data 25, "Contact Company "

   objContact.Update

Next LoopCount

 

If dbAct.Unlock = False Then

   MsgBox "Could not unlock database. Aborting"

   Exit Sub

End If

 

If dbAct.EndBatchInsert = FALSE then

   MsgBox "Could not unlock database. Error was: "& dbAct.LastError

   Exit Sub

End If

 

dbAct.Close

Close Method

Description    Closes the current database. Call this method to close an open database or after unsuccessfully validating a user to a multiuser database.

Object            Database

Syntax            object.Close

Return type   Void

See also         IsOpen, IsOpening

Contact Property

Description    Returns a Contact object. The Database object returns the same instance of the Contact object on each subsequent call.

Object            Database

Syntax            object.Contact

Value type      Object/LPDISPATCH, Read Only

See also         Contact Object

CurrentUser Property

Description    Returns the name of the current user of the database. This property returns the logon name of the current user, not the contact name for that user.

Object            Database

Syntax            object.CurrentUser

Value type      String, Read Only

See also         IsMultiUser, IsOpen,
Count in Users object

DatabaseVersion Method (requires ACT! 4.0 or later)

Description    Returns a string that contains the version of the current database, which is 3.0 or 4.0 for the ACT! 4.0 application or 5.0 for the ACT! 2000 application.

Note: In ACT! 2000, ACT! 3.0 and ACT! 4.0 format databases must be converted to ACT! 2000 format.

Object            Database

Syntax            object.DatabaseVersion

Return type   String

Example         'This example checks for the OLE Database Object version, then checks

'if the database is an ACT! 3.0 or ACT! 4.0 format database.

 

If (Val(objDatabase.Version) > 3) Then

   If (Val(objDatabase.DatabaseVersion) > 3) Then

   'Ticker Symbol field is available only in ACT! 4.0 format database.

   objDatabase.CONTACT.Data CF_TickerSymbol, "TS"

   End If

End If

Email Property

Description    Returns an Email object. The Database object returns the same instance of the Email object on each subsequent call.

Object            Database

Syntax            object.Email

Value type      Object/LPDISPATCH, Read Only

See also         Email Object

EndBatchInsert Method (requires ACT! 4.0.2 or later)

Description    Turns off batch mode to end batch insertion of new records for the current database. Returns True if batch mode was successfully turned off or False if batch mode was not turned off. Use the LastError property to get information on an error.

Object            Database

Syntax            object.EndBatchInsert

Return type   Boolean

See also         BeginBatchInsert

Example         See BeginBatchInsert, BeginBatchUpdate, EndBatchUpdate, IsInBatchMode, IsLocked, Lock, Unlock
LastError in common properties and methods

EndBatchUpdate Method (requires ACT! 4.0.2 or later)

Description    Turns off batch mode to end batch update of existing records for the current database. Returns True if batch mode was successfully turned off or False if batch mode was not turned off. Use the LastError property to get information on an error.

Object            Database

Syntax            object.EndBatchUpdate

Return type   Boolean

See also         BeginBatchUpdate, IsInBatchMode

Example         See BeginBatchInsert, BeginBatchUpdate, EndBatchInsert, IsInBatchMode, IsLocked, Lock, Unlock
LastError in common properties and methods

GetDatabasePath Method (requires ACT! 4.0 or later)

Description    Returns a string that contains the full path to the currently open database. If no database is open, a null value or empty string is returned.

Object            Database

Syntax            object.GetDatabasePath

Return type   String

Example         'This example gets the path of the currently open database from

'the Database object.

 

dim objDatabase as Object

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open(C:\My Documents\ACT\Database\ACT5demo.dbf)

if objDatabase.IsOpen = FALSE then

   MsgBox "Failed opening the database"

else

   MsgBox "Currently open database is: " & objDatabase.GetDatabasePath

endif

 

objDatabase.Close

Set objDatabase = Nothing

GetTableId Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer that contains the Table ID of the ACT! table with the specified index, as stored in the ACT! codebase schema.

Object            Database

Syntax            object.GetTableId iIndex

Parameters    iIndex                    A short integer that specifies the table index number, in a range between 0 and one less than the value of TableCount.

Return type   Short Integer

Comments     This method returns the following Table ID values:

Table ID

Table name

 

Table ID

Table name

1

Contact table

 

16

Group table

2

Activity table

 

32

Sales table

4

Notes/History table

 

64

List table

8

E-mail table

 

 

 

See also         GetTableNameFromId, GetTableNameFromIndex, TableCount

GetTableNameFromId Method (requires ACT! 3.0.6 or later)

Description    Returns a string that contains the table name for the specified Table ID.

Object            Database

Syntax            object.GetTableNameFromId iTableID

Parameters    iTableID                A short integer that specifies the Table ID.

This method returns the following table names:

Table ID

Table name

 

Table ID

Table name

1

Contact table

 

16

Group table

2

Activity table

 

32

Sales table

4

Notes/History table

 

64

List table

8

E-mail table

 

 

 

Return type   String

See also         GetTableId, GetTableNameFromIndex

GetTableNameFromIndex Method (requires ACT! 3.0.6 or later)

Description    Returns a string that contains the table name for the specified table index number.

Object            Database

Syntax            object.GetTableNameFromIndex iIndex

Parameters    iIndex                    A short integer that specifies the table index number, in a range between 0 and one less than the value of TableCount.

Return type   String

See also         GetTableId, GetTableNameFromId, TableCount

GetUniqueId Method

Description    Returns a string that contains a new Unique ID.

Object            Database

Syntax            object.GetUniqueId

Return type   String

See also         IsOpen

Group Property

Description    Returns a Group object. The Database object returns the same instance of the Group object on each subsequent call.

Object            Database

Syntax            object.Group

Value type      Object/LPDISPATCH, Read Only

See also         Group object

IsInBatchMode Property (requires ACT! 4.0.2 or later)

Description    Returns True if the current database is in batch mode for insertion of records or False if it is not in batch mode. Call this property immediately before inserting records into a database in batch mode.

Object            Database

Syntax            object.IsInBatchMode

Value type      Boolean, Read Only

See also         BeginBatchInsert, BeginBatchUpdate, EndBatchInsert, EndBatchUpdate, IsLocked, Lock, Unlock

Example         See BeginBatchInsert

IsLocked Property (requires ACT! 4.0.2 or later)

Description    Returns True if the current database is locked or False if it is not locked. Call this property immediately before turning on batch mode for insertion of records into a database.

Object            Database

Syntax            object.IsLocked

Value type      Boolean, Read Only

See also         BeginBatchInsert, BeginBatchUpdate, EndBatchInsert, EndBatchUpdate, IsInBatchMode, Lock, Unlock

Example         See BeginBatchInsert

IsMultiUser Property

Description    Returns True if the open database is a multiuser database (or a password-protected single-user database) or False if it is a single-user database.

Object            Database

Syntax            object.IsMultiUser

Value type      Boolean, Read Only

Comments     Multiuser databases must have two or more users who have logged on to the database and have generated a My Record contact record. Adding an ACT! user who hasn’t logged in as that user at least once does not increase the user count.

See also         IsOpen, IsOpening, ValidateUser
Count in Users object

Example         See ValidateUser

IsOpen Property

Description    Returns the open status of the database. Returns True after Open has been successfully called for a single-user database or after ValidateUser has been successfully called for a multiuser database. False is returned if Open has been called successfully for a multiuser database.

Object            Database

Syntax            object.IsOpen

Value type      Boolean, Read Only

See also         IsMultiUser, IsOpen, ValidateUser

IsOpening Property

Description    Returns the current open status of a multiuser database. Returns True after Open has been successfully called for a multiuser database and prior to calling ValidateUser. Returns False after ValidateUser has been successfully completed.

Object            Database

Syntax            object.IsOpening

Value type      Boolean, Read Only

See also         IsMultiUser, IsOpen, ValidateUser
Count in Users object

Lock Method (requires ACT! 4.0.2 or later)

Description    Locks the current database. If the database is currently in use, either on a network drive or the local computer, the database lock is delayed by five minutes. True is returned if the database is successfully locked or False is returned if the database could not be locked. Use the LastError property to get information on an error.

Object            Database

Syntax            object.Lock

Return type   Boolean

Comments     To use this method, the logged on user must have an Administrator security level.

See also         BeginBatchInsert, Unlock
LastError in common properties and methods

LogTransactions Property

Description    Gets and sets the status of automatic transaction logging. This property returns or sets True if transaction log records will be generated when contact data is added, modified, or deleted or returns False if the transaction log records are not generated by changes to contact data. The default value is False.

Object            Database

Syntax            object.LogTransactions [True|False]

Parameters    [True|False]           Specify True to turn on automatic transaction logging, or False to turn off automatic transaction logging. Omit this optional parameter to get the status of automatic transaction logging.

Value type      Boolean, Read/Write

MajorVersion Property

Description    Returns the major version number of the ACT! OLE Database Object.

Object            Database

Syntax            object.MajorVersion

Value type      Short Integer, Read Only

Comments     Use Version instead of this property for ACT! 3.0.6 or later to determine if new properties and methods in the OLE Database Object can be used.

                        This property returns one of the following values:

Value

Version of ACT!

 

Value

Version of ACT!

1

3.0 through 3.0.5

 

40

4.0.x

30

3.0.6 through 3.0.8

 

50

2000

4

4.0

 

 

 

See also         MinorVersion, Version

MinorVersion Property

Description    Returns the minor version number of the ACT! OLE Database Object. In ACT! 3.0.7, for example, a value of “7” is returned.

Object            Database

Syntax            object.MinorVersion

Value type      Short Integer, Read Only

Comments     Use Version instead of this property for ACT! 3.0.6 or later to determine if new properties and methods in the OLE Database Object can be used.

See also         MajorVersion, Version

Name Property

Description    Returns a string containing the name of the currently open database, for example “act5demo.dbf”.

Object            Database

Syntax            object.Name

Value type      String, Read Only

See also         IsOpen, Open

NoteHistory Property

Description    Returns a NoteHistory object. The Database object returns the same instance of the NoteHistory object on each subsequent call.

Object            Database

Syntax            object.NoteHistory

Value type      Object/LPDISPATCH, Read Only

Open Method

Description    Opens the specified database. This method opens a single user or multiuser database, and must be successful to access properties and methods that are database-dependent.

Object            Database

Syntax            object.Open szDatabaseName

Parameters    szDatabaseName   A string that specifies the name and path of an ACT! database.

Return type   Void

See also         IsMultiUser, IsOpen, IsOpening, OpenEx, ValidateUser

OpenEx Method (requires ACT! 4.0 or later)

Description    Opens the specified database, bypassing the validation process provided by the ValidateUser method. To use this method, the specified database must be open in the ACT! application. This method opens a single user or multiuser database, and must be successful to access properties and methods that are database-dependent.

Object            Database

Syntax            object.OpenEx szDatabaseName

Parameters    szDatabaseName   A string that specifies the name and path of an ACT! database. Specify szDatabaseName as "" to open the currently open database.

Return type   Void

See also         IsMultiUser, IsOpen, IsOpening, Open, ValidateUser

Example         'This example opens a database without validating the user.

 

dim objDatabase as Object

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.OpenEx ""

if objDatabase.IsOpen = FALSE then

   MsgBox "Failed opening the database"

else

   MsgBox "Currently open database is: " & objDatabase.GetDatabasePath

endif

 

dim objDatabase as Object

Set objDatabase = Nothing

PhoneFormatting Property

Description    Gets and sets the format for phone numbers that are returned by the Data method.

Note: When setting data into a phone field, you can only pass a TAPI canonical-formatted phone number.

Object            Database

Syntax            object.PhoneFormatting [iValue]

Parameters    iValue                    A short integer that specifies the phone number format, in a range from 1 to 3. Omit this optional parameter to get the phone number format.

Value type      Short Integer, Read/Write

Comments     This property returns or sets one of the following values:

Value

Description

1

All phone numbers are returned in TAPI canonical format. This string may be passed to any TAPI components. This is the default setting.

2

All phone numbers are returned in ACT! 2000 displayable format, which may not work with an automatic dialer.

3

All phone numbers are returned in ACT! 2000 displayable format, starting with a country code enclosed in brackets [ ]. The default country code is the My Record phone number country code, which is [1] for the United States and Canada. This format may not work with an automatic dialer.

See also         IsOpen, Open

Relations Property (requires ACT! 3.0.6 or later)

Description    Returns the Relations object. The Database object returns the same instance of the Relations object on each subsequent call.

Object            Database

Syntax            object.Relations

Value type      Object/LPDISPATCH, Read Only

TableCount Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer that contains the total number of ACT! database tables. The value “5” is returned in ACT! 3.0.6 and 4.0. The value “7” is returned in ACT! 2000.

Object            Database

Syntax            object.TableCount

Return type   Short Integer

Unlock Method (requires ACT! 4.0.2 or later)

Description    Unlocks the current database. True is returned if the database is successfully unlocked or False is returned if the database could not be unlocked. Use the LastError property to get information on an error.

Object            Database

Syntax            object.Unlock

Return type   Boolean

Comments     To use this method, the logged on user must have an Administrator security level.

See also         BeginBatchInsert, Lock
LastError in common properties and methods

Users Property

Description    Returns a Users object. The Database object returns the same instance of the Users object on each subsequent call.

Object            Database

Syntax            object.Users

Value type      Object/LPDISPATCH, Read Only

ValidateUser Method

Description    Authenticates a user to a multiuser database.

Object            Database

Syntax            object.ValidateUser szUser [, szPassword]

Parameters    szUser                    A string that specifies the user’s name.

[szPassword]         A string that specifies the user’s password. This parameter is required if the user has a password.

Return type   Void

Comments     Call this method after the following conditions have been met:

1        After calling Open, and

2       False is returned for IsOpen, and

3       True is returned for IsOpening or IsMultiUser.

Note: To use this method, the specified user must have previously logged on to the database and generated a My Record contact record. When more than one user is enabled for logon to the database, call this method after calling Open.

See also         IsMultiUser, IsOpen, IsOpening, Open

Example         'This sample demonstrates how to properly log on to a multiuser

'ACT! database

 

Dim objData as Object

 

'Create the object

Set objData = CreateObject("ACTOLE.DATABASE")

 

'Open the database

objData.Open dbName

 

'Perform login validation - nothing really happens

If objData.IsMultiUser Then

   'at this point you can display a dialog which asks for

   'username and password. The dialog is something you create.

   objData.ValidateUser username, password

 

   If objData.Error Then

       Login = False

   Else

       Login = True

   End If

Else

   Login = True

   'Single-user database - validation not required

End If

 

If objData.IsOpen Then

   'At this point it is now safe to start reading/writing ACT! data.

   objData.Close

End If

 

Set objData = Nothing

Version Property (requires ACT! 3.0.6 or later)

Description    Returns a string that contains the version of the ACT! OLE Database Object. An example of a returned string is 5.0.0.175, where 5.0.0 is the version of ACT! (ACT! 2000) and 175 is the number of the build. Use this property to verify the version to determine if new properties and methods in the OLE Database Object can be used.

Object            Database

Syntax            object.Version

Value type      String, Read Only

See also         ActVersion

Email object methods

The Email object contains e-mail information for the active Database object. The following methods apply only to the Email object. See “Common properties and methods” in this section for additional properties and methods that apply to the Email object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

ClearContactScope

None

 

Void

SetContactScope

szUniqueID

String

Void

ClearContactScope Method (requires ACT! 3.0.7 or later)

Description    Clears any existing contact scoping. Resets the current record position to the first record and rebuilds the list of E-mail records without applying contact scoping.

Object            Email

Syntax            object.ClearContactScope

Return type   Void

See also         SetContactScope

SetContactScope Method (requires ACT! 3.0.7 or later)

Description    Narrows the current set of E-mail records to the E-mail records for the contact record with the specified Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            Email

Syntax            object.SetContactScope szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of a contact record.

Return type   Void

See also         ClearContactScope

Example         'List the e-mail address and other e-mail properties for a contact.

 

Dim objDatabase As Object

Dim objEmail As Object

Dim strContactID As String

 

'Clear the listbox

lstDisplay.Clear

 

'Create the object

lstDisplay.AddItem "Creating Database Object"

Set objDatabase = CreateObject("ACTOLE.DATABASE")

 

'Open the database

lstDisplay.AddItem "Opening Database"

objDatabase.Open dbName

 

'Assign the correct table object

Set objEmail = objDatabase.EMAIL

 

If objDatabase.IsOpen Then

   objEmail.SetContactScope strContactID

   lstDisplay.AddItem objEmail.RecordCount & " found for the Contact"

   Set objEmail = Nothing

   objDatabase.Close

   lstDisplay.AddItem "Database Closed"

End If

 

Set objDatabase = Nothing

ExceptionInfo object properties and methods

The ExceptionInfo object contains the recurring exception information for a particular activity. The following properties and methods apply only to the ExceptionInfo object. See “Common properties and methods” in this section for additional properties that apply to the ExceptionInfo object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Count

None

Short Integer

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Add

exceptionDate

Date

Void

Clear

None

 

Void

Remove

exceptionDate

Date

Void

Seek

exceptionDate

Date

Void

Value

iIndex

Short Integer

Date/Variant

Add Method

Description    Adds a date to the exception list for the current activity.

Object            ExceptionInfo

Syntax            object.Add exceptionDate

Parameters    exceptionDate        A Date value that specifies the date to add to the exception list, formatted in Windows Regional Settings Short Date style.

Return type   Void

Clear Method

Description    Clears and commits the exception list for the current activity. Call this method to erase the list of exceptions for a primary recurring activity.

Object            ExceptionInfo

Syntax            object.Clear

Return type   Void

Comments     This method does not erase any activity records; it just makes ACT! erase the exception and reset the previous date. For example, if an occurrence of a recurring activity is moved from the 3rd to the 4th, a new activity record is generated for the 4th. If the exception list for the primary recurring activity is erased, the activity for the 3rd reappears.

                        A recurring activity has only one record, which is the primary activity. All other instances of a recurring activity are mathematically calculated and are not represented in the physical database.

Count Property

Description    Returns the number of exceptions for the current activity.

Object            ExceptionInfo

Syntax            object.Count

Value type      Short Integer, Read Only

Comments     An exception item is a Date value stored with the primary recurring activity. The Date value represents a recurring instance of the activity that has been altered.

                        For example, an activity is set to recur every other day, for example the 1st, 3rd, and the 5th, and the user moves the recurring instance for the 3rd to the 4th. ACT! generates a new activity record with a date of the 4th and adds the 4th to the exception list of the primary recurring activity, which is the 1st in this example, thus increasing the count or number of exceptions.

Remove Method

Description    Removes a date from the exception list. Removing a date causes the recurring instance for the deleted date to reappear in the calendar as an activity.

Object            ExceptionInfo

Syntax            object.Remove exceptionDate

Parameters    exceptionDate        A Date value that specifies the date to remove from the exception list, formatted in Windows Regional Settings Short Date style.

Return type   Void

Seek Method

Description    Locates the specified exception date. Call this method to determine if a specified date exists in the exception list.

Object            ExceptionInfo

Syntax            object.Seek exceptionDate

Parameters    exceptionDate        A Date value that specifies the exception date to locate, formatted in Windows Regional Settings Short Date style.

Return type   Void

Value Method

Description    Returns a date value for a position in the exception list.

Object            ExceptionInfo

Syntax            object.Value iIndex

Parameters    iIndex                    A short integer that specifies the position within the exception list, in the range between 1 and Count.

Return type   Date/Variant

See also         Count

Fields object properties and methods

The Fields object contains the data properties for a specified ACT! field. The following properties and methods apply only to the Fields object. See “Common properties and methods” in this section for additional properties that apply to the Fields object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

AutoPopulate

iFieldID
[,=True|False]

Short Integer,
Boolean

Boolean

Read/Write

Count

None

 

Short Integer

Read Only

DecimalPlaces

iFieldID [= iDecPlace]

Short Integer, Short Integer

Short Integer

Read/Write

EntryRule

iFieldID

Short Integer

Short Integer

Read/Write

EntryTrigger

iFieldID
[, szExecutableName]

Short Integer,
String

String

Read/Write

Exists

szField

String

Boolean

Read Only

ExitTrigger

iFieldID
[, szExecutableName]

Short Integer,
String

String

Read/Write

FieldId

szField

String

Short Integer

Read Only

FieldIdAt

iFieldID

Short Integer

Short Integer

Read Only

Flags

iFieldID [= lFlag]

Short Integer,
Long Integer

Long Integer

Read/Write

HasPopupList

iFieldID

Short Integer

Boolean

Read Only

Id

iFieldID

Short Integer

Short Integer

Read Only

InitialValue

iFieldID

Short Integer

String

Read/Write

IsBlockSync

iFieldID [=True|False]

Short Integer, Boolean

Boolean

Read/Write

IsCutHistory

iFieldID
[True|False]

Short Integer, Boolean

Boolean

Read/Write

IsIndexed

iFieldID

Short Integer

Boolean

Read Only

IsPrimary

iFieldID

Short Integer

Boolean

Read/Write

IsSortable

iFieldID

Short Integer

Boolean

Read Only

Label

iFieldID [= szLabel]

Short Integer, String

String

Read/Write

Length

iFieldID

Short Integer

Short Integer

Read Only

Modifiable

iFieldID

Short Integer

Long Integer

Read Only

POPUPINFO

iFieldID, iPopupIndex

Short Integer,
Short Integer

Object/
LPDISPATCH

Read Only

Type

iFieldID

Short Integer

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

BeginBatch

None

 

Boolean

EndBatch

None

 

Boolean

GetLinkToList

iFieldID,
iLinkToField,
iLinkToTable

Short Integer,
Short Integer,
Short Integer

Short Integer

SetLinkToList

iFieldID,
iLinkToField,
iLinkToTable

Short Integer,
Short Integer,
Short Integer

Boolean

UnLinkLists

iFieldID,
True|False

Short Integer,
Boolean

Boolean

AutoPopulate Property (requires ACT! 2000 or later)

Description    Gets or sets the Automatically Add New Items To Drop-Down option in Define Fields for the specified field. Returns True if the option is selected or False if the option is not selected. If set, AutoPopulate enables auto-population of a field with a drop-down list.

Object            Fields

Syntax            object.AutoPopulate iFieldID [, = True|False]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[= True|False]       Specify True to select the Automatically Add New Items To Drop-Down option for the specified field or False to deselect it. Omit this optional parameter to determine the setting of the option.

ValueType      Boolean, Read/Write

Example         Set objData = CreateObject("ACTOLE.DATABASE")

 

'Open the database

List1.AddItem "Opening Database"

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objContact = objDatabase.CONTACT

   'Let the User1 fields auto-populate property be set to true

   objContact.fields.AutoPopulate CF_User1, True

   objDatabase.close

End If

 

Set objData = Nothing

BeginBatch Method (requires ACT! 4.0.2 or later)

Description    Prepares the database for schema editing. Returns True if the database is prepared for schema editing and False if it is not prepared. Use the LastError property to get information on an error.

Note: Batch functions must be called in the correct sequence. Any functions called that attempt to place another lock on a schema can cause problems. Therefore, you should call only those functions that are needed during batch mode.

Object            Fields

Syntax            object.BeginBatch

Return type   Boolean

See also         EndBatch
LastError in common properties and methods

Example         'The following sample changes various properties of different fields in the

'Contact object in Batch mode.

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase .Open dbName

Dim ret As Boolean

 

If objDatabase .IsOpen Then

   'Create the Contact and Fields objects

   Set objContact = objDatabase .Contact

   Set objCF = objContact.fields

 

   'Begin the batch processing, catch errors, and exit the process

   'if unsuccessful.

   ret = objCF.BeginBatch

 

   If ret <> True Then   'If there was an error

       MsgBox "Problem entering batch , Error# " & objCF.LastError

       End Sub

   End If

 

   'Set some properties for various Contact fields

   objCF.IsCutHistory CF_Name, False

   objCF.IsCutHistory CF_Company, True

   objCF.IsCutHistory CF_City, True

   objCF.SetLinkToList CF_User1, CF_Company, 1

   objCF.EntryRule CF_User2, 2

   objCF.UnLinkLists CF_AltCity, True

 

   'Complete the batch mode

   ret = objCF.EndBatch

   'If an error occurs, flag the error

   If ret <> True Then

       MsgBox "Problem ending batch , Error# " & objCF.LastError

       End Sub

   End If

End If

 

Set objCF = Nothing

Set objContact = Nothing

objDatabase.Close

Set objdatabase = Nothing

Count Property

Description    Returns the number of fields in the parent table object.

Object            Fields

Syntax            object.Count

Value type      Short Integer, Read Only

DecimalPlaces Property

Description    Gets and sets the number of decimal places in the specified field.

Object            Fields

Syntax            object.DecimalPlaces iFieldID [= iDecPlace]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[= iDecPlace]         A short integer that specifies the number of decimal places to set for the specified field. Omit this optional parameter to get the number of decimal places in the specified field.

Value type      Short Integer, Read/Write

See also         Count, Modifiable

EndBatch Method (requires ACT! 4.0.2 or later)

Description    Ends the current batch operation. Returns True if the batch operation has ended and False if it has not ended. Use the LastError property to get information on an error.

Note: Batch functions must be called in the correct sequence. Any functions called that attempt to place another lock on a schema can cause problems. Therefore, you should call only those functions that are needed during batch mode.

Object            Fields

Syntax            object.EndBatch

Return type   Boolean

See also         BeginBatch
LastError in common properties and methods

EntryRule Property (requires ACT! 4.0.2 or later)

Description    Gets and sets the entry rule attribute for the field specified by the iFieldID parameter.

Object            Fields

Syntax            object.EntryRule iFieldID [=iEntryRule]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[=iEntryRule]         A short integer that specifies the entry rule for the specified field. Omit this optional parameter to get the entry rule.

Value type      Short Integer, Read/Write

Comments     This property can get or set one of the following values:

Value

Description

0

No rules

1

Field cannot be blank (data is required)

2

Only from drop-down (information must be selected from a drop-down list)

3

Protected (protects the field from modification)

See also         IsCutHistory, EntryTrigger

EntryTrigger Property

Description    Gets and sets the Entry Trigger executable file for the specified field.

Object            Fields

Syntax            object.EntryTrigger iFieldID [, szExecutableName]

Parameters    iFieldID                       A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[, szExecutableName]   A string that specifies the executable application (.EXE) or macro (.MPR) entry trigger file to launch when the specified field is entered. Omit this optional parameter to get the name of the executable file that is the entry trigger for the specified field.

Value type      String, Read/Write

See also         Count, ExitTrigger

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

Dim tableObject As Object

Set tableObject = objData.CONTACT

 

'*** Set an entry trigger to NOTEPAD.EXE

tableObject.FIELDS.EntryTrigger CF_Company, "notepad.EXE"

 

'*** Get the entry trigger

dim strOut as String

strOut = tableObject.FIELDS.EntryTrigger (CF_Company)

objData.Close

 

set objData = Nothing

Exists Property

Description    Returns True if the specified field exists or False if it does not exist.

Object            Fields

Syntax            object.Exists szField

Parameters    szField                   A string that specifies the label of the field.

Value type      Boolean, Read Only

See also         Count, Label

ExitTrigger Property

Description    Gets and sets the Exit Trigger executable file for the specified field.

Object            Fields

Syntax            object.ExitTrigger iFieldID [, szExecutableName]

Parameters    iFieldID                       A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[, szExecutableName]   A string that specifies the executable application (.EXE) or macro (.MPR) exit trigger file to launch when the specified field is exited. Omit this optional parameter to get the name of the executable file that is the exit trigger for the specified field.

Value type      String, Read/Write

See also         Count, EntryTrigger

Example         'This example demonstrates how to set and get exit triggers.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

Dim tableObject As Object

Set tableObject = objData.CONTACT

 

'*** Set an exit trigger to NOTEPAD.EXE

tableObject.FIELDS.ExitTrigger CF_Company, "notepad.EXE"

 

'*** Get the exit trigger

dim strOut as String

strOut = tableObject.FIELDS.ExitTrigger (CF_Company)

objData.Close

 

set objData = Nothing

FieldId Property (requires ACT! 3.0.7 or later)

Description    Returns a short integer containing the field ID for the field with the specified name. Field names are shown in Define Fields within the ACT! application.

Object            Fields

Syntax            object.FieldId szField

Parameters    szField                   A string that specifies the field name. See the ACT! Database File Formats Reference appendix for the default field names for fields in ACT! database tables (Field constants).

Value type      Short Integer, Read Only

Example         'Get the field ID for the Company field in the Contact table

 

Dim nFieldId as integer

'nFieldId should have the value 25

nFieldId = ObjContact.FIELDS.FieldId ("Company")

FieldIdAt Property (requires ACT! 3.0.6 or later)

Description    Returns a short integer containing the field ID for the field with the specified index.

Object            Fields

Syntax            object.FieldIdAt iFieldID

Parameters    iFieldID                 A short integer that specifies the index number for the field, in the range between 1 and Count.

Value type      Short Integer, Read Only

Flags Property

Description    Gets and sets the drop-down list flag for the specified field. This property is used to get and set the field definitions for fields with drop-down lists.

Object            Fields

Syntax            object.Flags iFieldID [= lFlag]

Parameters    iField                     A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[= lFlag]                A long integer that specifies a value between 0 and 3, to set or clear the flag(s) for a specified field. Omit this optional parameter to get the value of the flag.

Value type      Long Integer, Read/Write

Comments     This property can get or set one of the following values:

Value

Description

0

Clears the flags for Allow Editing and Show Descriptions to disable editing of drop-down list items and disable the display of drop-down list item descriptions for the specified field.

1

Sets the flag for Allow Editing to allow the editing of drop-down list items for the specified field.

2

Sets the flag for Show Descriptions to display drop-down list item descriptions for the specified field.

3

Sets the flags for Allow Editing and Show Descriptions of drop-down list items for the specified field.

GetLinkToList Method (requires ACT! 2000 or later)

Description    Gets the field ID and table (Contact or Group) with the drop-down list that is linked to by specified field.

Object            Fields

Syntax            object.LinkToList iFieldID, iLinkToField, iLinkToTable

Parameters    iFieldID                 A short integer that specifies the field ID of the field for which to find a field with the linked drop-down list the field.

iLinkToField          A short integer variable to contain the field ID of the field with the drop-down list linked to the field specified in the iFieldID parameter.

iLinkToTable         A short integer variable to contain a value for the table containing the fields with the linked drop-down list. A value of 1 is returned for the Contact table and 16 is returned for the Group table.

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   Short Integer

See also         SetLinkToList, UnLinkLists

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objContact = objData.CONTACT

   'FieldID: stores the field ID of the field with the drop-down list

   'linked to the CF_User1 field.

   'TableID : Stores the ID of the table (Contact or Group)

   'containing the field with the linked drop-down list.

   objContact.fields.GetLinkToList(CF_User1, FieldID, TableID)

   MsgBox " User1 is using dropdown list from " & FieldID & "  of table " &

       TableID

   Set objContact = Nothing

   objData.close

End If

 

Set objData = Nothing

HasPopupList Property

Description    Returns True if the specified field has a drop-down list or False if the field does not have a drop-down list.

Object            Fields

Syntax            object.HasPopupList iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Boolean, Read Only

Id Property

Description    Gets the field ID of the specified field. You can use this property to verify that the specified field exists. If the field does not exist, this property returns the value –1. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Object            Fields

Syntax            object.Id iFieldID

Parameters    iFieldID                 A short integer that specifies the index number for the field, in the range between 1 and Count.

Value type      Short Integer, Read Only

See also         Count

InitialValue Property

Description    Gets and sets the default value in new records for the specified field.

Object            Fields

Syntax            object.InitialValue iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      String, Read/Write

See also         Count, Modifiable

IsBlockSync Property

Description    Gets and sets synchronization blocking for the specified field. If True is set or returned, the field is not available (blocked) for data synchronization. If False is set or returned, the field is available for data synchronization.

Object            Fields

Syntax            object.IsBlockSync iFieldID [= True|False]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[=True|False]        Specify True if the field is not available (blocked) for data synchronization or False if the field is available for data synchronization. Omit this parameter to get the synchronization setting for the specified field.

Value type      Boolean, Read/Write

See also         Count, Modifiable

IsCutHistory Property

Description    Gets and sets the generate history attribute for the specified field. Returns True if a history record is generated when the specified field is modified or False if a history record is not generated. (Requires ACT! 4.0.2 or later for the set function.)

Object            Fields

Syntax            object.IsCutHistory iFieldID [True|False]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

True|False             Specify True to generate a history record when the specified field is modified or False to not generate a history record (requires ACT! 4.0.2 or later). Omit this optional parameter to get the generate history attribute for the specified field.

Value type      Boolean, Read/Write

See also         Count, Modifiable

IsIndexed Property

Description    Returns True if the specified field has an index applied or False if the field is not indexed.

Object            Fields

Syntax            object.IsIndexed iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Boolean, Read Only

See also         Count

IsPrimary Property

Description    Returns True if the specified field is a Primary Field or False if the field is not a Primary Field. The contents of primary fields are copied when a contact or group is duplicated.

Object            Fields

Syntax            object.IsPrimary iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Boolean, Read/Write

See also         Count, Modifiable

IsSortable Property

Description    Returns True if the specified field can be indexed or False if it cannot be indexed. Check this property for a field before passing the field to the Sort method.

Object            Fields

Syntax            object.IsSortable iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Boolean, Read Only

See also         Count

Label Property

Description    Gets and sets the field label that is displayed in the ACT! application. This property refers to the field label that is displayed in the ACT! application and not the database structure field name. Use the Rebuild method to rebuild the table after making changes to field label names.

Caution: This property is modifiable by all users, so be careful when using this as a reference.

Object            Fields

Syntax            object.Label iFieldID [= szLabel]

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

[= szLabel]            A string that specifies the new label name for the specified field. Omit this optional parameter to get the existing field label for the specified field.

Value type      String, Read/Write

See also         Count, Modifiable
Rebuild in common properties and methods

Length Property

Description    Returns the length of the specified field.

Object            Fields

Syntax            object.Length iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Short Integer, Read Only

Comments     ACT! fields with a length that can be modified return a value of 1 or higher for the length. The ACT! fixed-length system fields of Blob, Date, DateTime, Phone, Time, TimeStamp, and UniqueID return a value of -1 for the length.

See also         Count, Modifiable

Modifiable Property

Description    Returns a long integer for the flag that specifies the allowable attribute changes for the field.

Object            Fields

Syntax            object.Modifiable iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Long Integer, Read Only

See also         Count

Comments     This property can return any combination of the following hexadecimal flag values:

Hexadecimal value

Description

&H0

Field cannot be modified

&H1

Field can be deleted, only by ACT!

&H2

Type can be modified

&H4

Label can be modified

&H8

Length can be modified, only by ACT!

&H10

Decimal places can be modified

&HFFFF

All field attributes are modifiable

To determine if a particular attribute flag is set, AND the hex value of the long integer returned with the desired flag. If the result is equal to the desired flag, the flag is set. If the result is not equal to the desired flag, the flag is not set.

POPUPINFO Property

Description    Returns a PopupInfo object.

Object            Fields

Syntax            object.POPUPINFO iFieldID, iPopupIndex

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

iPopupIndex          A short integer that specifies a drop-down list that has been associated with a field. The value of zero is usually returned for this field.

Value type      Object/LPDISPATCH, Read Only

Comments     This method will initialize a PopupInfo object with the field ID and popup index values, and return its object/dispatch pointer. It is possible to have more than one drop-down list associated with a particular field. Currently, the only field that has more than one drop-down list is the Regarding field in the Activity object.

SetLinkToList Method (requires ACT! 2000 or later)

Description    Sets the field with the drop-down list to link to the specified field in the Contact or Group table. This method locks the current database. If the database is currently in use, either on a network drive or the local computer, the database lock is delayed by five minutes. Returns True if successful or False if unsuccessful.

Object            Fields

Syntax            object.SetLinkToList iFieldID, iLinkToField, iLinkToTable

Parameters    iFieldID                 A short integer that specifies the field ID of the field for which to link to the drop-down list in the field specified by the iLinkToField parameter.

iLinkToField          A short integer that specifies the field ID of the field with the drop-down list to link to the field specified by the iFieldID parameter.

iLinkToTable         A short integer that specifies the table containing the field with the drop-down list to link to the field specified by the iFieldID parameter. Specify 1 for the Contact table or 16 for the Group table.

See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

            Return type   Boolean

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objContact = objData.CONTACT

   'CF_User1 field to link to the drop-down list in the User1 field

   'of the Group table.

   objContact.fields.SetLinkToList(CF_User1, GF_User1, 16)

   MsgBox " User1 is using drop-down list from " & fieldID & "  of table " &

       TableId

   Set objContact = Nothing

   objData.close

End If

 

Set objData = Nothing

Type Property

Description    Returns a value that represents the data type for a specified field.

Object            Fields

Syntax            object.Type iFieldID

Parameters    iFieldID                 A short integer that specifies the field ID for the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Value type      Short Integer, Read Only

Comments     This property returns the following data type values:

Value

Description

Format

Example

0

None

 

 

1

String

 

fieldName

2

String -Uppercase

 

FIELDNAME

3

String -Lowercase

 

fieldname

4

String -Initial Capital

 

Fieldname

5

Numeric

 

5

6

Numeric -Currency

($$¢¢)

5000

7

TimeStamp

yyyyMMddhhmmss

19940501202701

8

Date

Short Date style in Windows Regional Settings

11/13/97

9

Time

Time style in Windows Regional Settings

20:27

10

DateTime

Short Date style and Time style in Windows Regional Settings

11/13/97 8:27pm

11

Blob

 

 

12

Binary

 

 

13

Unique ID

 

7O)E& HP"7R

14

Phone

canonical

+1 (905) 5554993

15

String -URL Address

 

www.actsoftware.com

Note: The field type refers to the data formatting information required by ACT! to display visible fields in the ACT! application. The data may be stored differently in its native format.

Date and time fields must be the required length and be formatted correctly as specified by the Short Date Style and Time Style in Windows Regional Settings when passed as a parameter to the Data property, or an error will be generated. TimeStamp field values are generated by the ACT! application. See Chapter 1 in this section for more information on date and time formats.

See also         Count, Modifiable
Data, Error, LastError in common properties and methods

UnLinkLists Method (requires ACT! 2000 or later)

Description    Removes the association of a field drop-down list with another list, so the two lists are independent. This means that a change to the list in a field is not changed in the list in another field. Returns True if successful or False if unsuccessful.

Object            Fields

Syntax            object. UnLinkLists (iFieldID, True|False)

Parameters    iFieldID                 A short integer that specifies the field ID of the field with which to remove the association with the list in another field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

                        True|False             Specify True to link the lists and False to unlink the lists.

Return type   Boolean

See also         GetLinkToList, SetLinkToList in common properties and methods

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objContact = objData.CONTACT

   'The User1 fields drop down list should not be linked to another

   'list and copy the current list.

   objContact.fields.UnLinkLists(CF_User1, True)

   Set objContact = Nothing

   objData.close

End If

 

Set objData = Nothing

Group object properties and methods

The Group object contains group and member information for the active Database object. The following properties and methods apply only to the Group object. See “Common properties and methods” in this section for additional properties and methods that apply to the Group object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

ContactCount

None

 

Long Integer

Read Only

Members

None

 

Object/LPDISPATCH

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

AddContact

szUniqueID

String

Void

AddSubGroup

None

 

Void

AssignParent

szUniqueID

String

Boolean

ChangeToParentGroup

None

 

Boolean

ChangeToSubGroup

szUniqueID

String

Boolean

ClearContactScope

None

 

Void

GetParent

None

 

String

GetSubGroup

iIndex

Short Integer

String

GetSubGroupCount

None

 

Long Integer

GetSubGroupList

None

 

Object/LPDISPATCH

GroupType

None

 

Short Integer

RemoveContact

szUniqueID

String

Void

SetContactScope

szUniqueID

String

Void

AddContact Method

Description    Adds a member to the current group. This method adds the specified contact to the current group if the current record is valid.

Object            Group

Syntax            object.AddContact szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of the contact record to add to the current group.

Return type   Void

See also         ContactCount, RemoveContact

AddSubGroup Method (requires ACT! 2000 or later)

Description    Creates a subgroup for the current group and leaves the group in add mode. This method works like the Add method, but can be used only for adding subgroups.

Object            Group

Syntax            object.AddSubGroup

Return type   Void

Comments     Creates a new record buffer with default field values so that field data can be assigned using the Data property. The new record is committed using the Update method or aborted if any record navigational method is called.

See also         AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupCount, GetSubGroupList, GroupType
Data, Update in common properties in methods

Example         Set objData = CreateObject("ACTOLE.DATABASE")

'Open the database

objData.Open dbName

 

If objData.IsOpen Then

   'Create the Group object

   Set objGroup = objData.GROUP

   'Move to the first group in the table

   objGroup.MoveFirst

   'Create a new subgroup for the first group

   guid = objGroup.AddSubGroup

 

   'Set field data

   objGroup.Data GF_Name, "My Subgroup"

 

   'Update the contents of the record

   objGroup.Update

 

   objData.close

End If

 

'Clear the object

Set objData = Nothing

AssignParent Method (requires ACT! 2000 or later)

Description    Sets the parent group of the current subgroup or sets the parent of a parent group that has no subgroups. The group must be in edit or add mode. Returns True if the parent is successfully set or False if unsuccessful.

Object            Group

Syntax            object.AssignParent szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of the parent group record.

Return type   Boolean

See also         AddSubGroup, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupCount, GetSubGroupList, GroupType

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

'Open the database

objDatabase .Open dbName

 

If objDatabase .IsOpen Then

   'Create the Group object

   Set objGroup = objDatabase.GROUP

   'Go to the subgroup to which to assign a parent

   objGroup.GoTo subGroupId

   'Edit the record

   objGroup.Edit

   'Assign the parent for that subgroup

   objGroup.AssignParent groupUniqueID

   objGroup.Update

   Set objGroup = Nothing

   objDatabase.close

End If

 

'Clear the object

Set objDatabase = Nothing

ChangeToParentGroup Method (requires ACT! 2000 or later)

Description    Changes the current subgroup to a parent group. The group must be in edit or add mode. Returns True if the subgroup is successfully changed to a parent group or False if unsuccessful.

Object            Group

Syntax            object.ChangeToParentGroup

Return type   Boolean

See also         AddSubGroup, AssignParent, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupCount, GetSubGroupList, GroupType

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

'Open the database

objDatabase .Open dbName

 

If objDatabase .IsOpen Then

   'Create the group object

   Set objGroup = objDatabase.GROUP

   'Go to the subgroup to change to a parent group

   objGroup.GoTo subGroupId

   objGroup.Edit

   'Change the subgroup to a parent group

   objGroup.ChangeToParentGroup

   objGroup.Update

   Set objGroup = Nothing

   objDatabase.close

End If

 

'Clear the object

Set objDatabase = Nothing

ChangeToSubGroup Method (requires ACT! 2000 or later)

Description    Changes the current group to a subgroup of the parent group specified by the szUniqueID parameter. The group must be in edit or add mode. Returns True if the group is successfully changed to a subgroup or False if unsuccessful.

Object            Group

Syntax            object.ChangeToSubGroup szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of the parent group record.

Return type   Boolean

See also         AddSubGroup, AssignParent, ChangeToParentGroup, GetParent, GetSubGroup, GetSubGroupCount, GetSubGroupList, GroupType

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

'Open the database

objDatabase .Open dbName

 

If objDatabase .IsOpen Then

   'Create the group object

   Set objGroup = objDatabase.GROUP

   'Go to the subgroup to change to a subgroup

   objGroup.GoTo subGroupId

   'Get the Unique ID parent for that subgroup

   objGroup.Edit

   objGroup.ChangeToSubGroup sParentId

   objGroup.Update

   Set objGroup = Nothing

   objDatabase.close

End If

 

'Clear the object

Set objDatabase = Nothing

ClearContactScope Method (requires ACT! 3.0.7 or later)

Description    Clears any existing contact scoping. Resets the current record position to the first record and rebuilds the list of Group records without applying contact scoping.

Object            Group

Syntax            object.ClearContactScope

Return type   Void

See also         SetContactScope

ContactCount Property

Description    Returns the number of contact members for the current group. This property returns the same count as members.RecordCount.

Object            Group

Syntax            object.ContactCount

Value type      Long Integer, Read Only

See also         RecordCount in Members object

GetParent Method (requires ACT! 2000 or later)

Description    Returns a string that specifies the Unique ID of the parent group of the current subgroup.

Object            Group

Syntax            object.GetParent

Return type   String

See also         AddSubGroup, AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetSubGroup, GetSubGroupCount, GetSubGroupList, GroupType

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

'Open the database

objDatabase .Open dbName

 

If objDatabase .IsOpen Then

   'Create the group object

   Set objGroup = objDatabase.GROUP

   'Go to the subgroup to assign to a parent group

   objGroup.GoTo subGroupId

   'Get the Unique ID of the parent for that subgroup

   ParentId = objGroup.GetParent

   'Get the name of the parent group

   objGroup.GoTo ParentId

   List1.AddItem "Parent is " & objGroup.Data(GF_Name)

   Set objGroup = Nothing

   objDatabase.close

End If

 

'Clear the object

Set objDatabase = Nothing

GetSubGroup Method (requires ACT! 2000 or later)

Description    Returns the Unique ID of the specified subgroup of the current group record.

Object            Group

Syntax            object.GetSubGroup iIndex

Parameters    iIndex                    A short integer that specifies the index number of the subgroup. Specify a value between 1 and the value returned by GetSubGroupCount.

Return type   String

See also         AddSubGroup, AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroupCount, GetSubGroupList, GroupType

Example         Set objData = CreateObject("ACTOLE.DATABASE")

 

'Open the database

objData.Open dbName

 

If objData.group.GetSubGroupCount > 0 Then

   'Create the group object

   Set objGroup = objData.GROUP

   'Get the Unique IDs of all subgroups for the group

   For i = 1 To objGroup.GetSubGroupCount

       suid = objGroup.GetSubGroup(i)

       List1.AddItem suid

   Next i

End If

 

List1.AddItem "Closing Database"

objData.close

 

Set objData = Nothing

GetSubGroupCount Method (requires ACT! 2000 or later)

Description    Returns the number of subgroups for the current parent group.

Object            Group

Syntax            object.GetSubGroupCount

Return type   Long Integer

See also         AddSubGroup, AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupList, GroupType

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   'Create the group object

   Set objGroup = objDatabase.GROUP

   objGroup.MoveFirst

 

   'Go through all the groups

   For i = 1 To objGroup.recordCount

       If objGroup.GroupType = 0 Then        'If Parent

          List1.AddItem objGroup.Data(GF_Name) & " is a group"

          'Get the Secondary Group count

          sgrpcount = objGroup.GetSubGroupCount

          List1.AddItem objGroup.Data(GF_Name) & " has " &

              sgroupCount & " subgroups ."

       Else      'SubGroup

          List1.AddItem objGroup.Data(GF_Name) & " is a sub-group"

       End If

       objGroup.MoveNext

   Next i

   objData.close

End If

 

Set objData = Nothing

GetSubGroupList Method (requires ACT! 2000 or later)

Description    Returns a dispatch pointer to an object containing the subgroup records for the current group. Returns NULL on error.

Object            Group

Syntax            object.GetSubGroupList

Return type   Object/LPDISPATCH

See also         AddSubGroup, AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupCount, GroupType

Example         'The following code goes through all the groups. If a group is a parent and

'the number of subgroups > 0, then create the subgroup list and enumerate

'the subgroups.

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

If objDatabase.IsOpen Then

   'Create the Group object

   Set objGroup = base.group

   objGroup.MoveFirst

   For i = 1 To objGroup.recordCount

       'If the group is a parent

       If objGroup.GroupType = 0 Then

          'If the number of subgroups is > 0

          If objGroup.GetSubGroupCount > 0 Then

              'Create another object that contains the subgroups for that

              'particular group.

              Set objSGroup = objGroup.GetSubGroupList

              'Enumerate the subgroups

              objSGroup.MoveFirst

          For j = 1 To objSGroup.recordCount

             List1.AddItem objSGroup.Data(GF_Name)

              objSGroup.MoveNext

          Next j

              Set objSGroup = nothing

          End If

       End If

End If

GroupType Method (requires ACT! 2000 or later)

Description    Determines the group type of the current group. Returns 0 if the current group is a parent group or 1 if it is a subgroup.

Object            Group

Syntax            object.GroupType

Return type   Short Integer

See also         AddSubGroup, AssignParent, ChangeToParentGroup, ChangeToSubGroup, GetParent, GetSubGroup, GetSubGroupCount, GetSubGroupList

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   'Create the group object

   Set objGroup = objDatabase.GROUP

   objGroup.MoveFirst

   'Go through all the groups

   For i = 1 To objGroup.recordCount

       If objGroup.GroupType = 0 Then        'If a parent

          List1.AddItem objGroup.Data(GF_Name) & " is a group"

          'Get the secondary group count

          sgrpcount = objGroup.GetSubGroupCount

          List1.AddItem objGroup.Data(GF_Name) & " has " &

              sgroupCount & " subgroups ."

       Else        'Subgroup

          List1.AddItem objGroup.Data(GF_Name) & " is a sub-group"

       End If

       objGroup.MoveNext

   Next i

   objData.close

End If

 

Set objData = Nothing

Members Property

Description    Returns a Members object for the specified group.

Object            Group

Syntax            object.Members

Value type      Object/LPDISPATCH, Read Only

RemoveContact Method

Description    Removes the specified contact from being a member of the current group. This method does not delete the contact record from the database; it only removes the relationship between the contact and the group.

Object            Group

Syntax            object.RemoveContact szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of the contact record to remove from the current group.

Return type   Void

See also         AddContact,
Error, LastError in common properties and methods

SetContactScope Method (requires ACT! 3.0.7 or later)

Description    Narrows the current set of Group records to the Group records for the contact record with the specified Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            Group

Syntax            object.SetContactScope szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of a contact record.

Return type   Void

See also         ClearContactScope

Example         'List all the groups a contact belongs to.

 

Dim objDatabase As Object

Dim objGroup As Object

Dim strContactID As String

 

'Clear the listbox

lstDisplay.Clear

 

'Create the object

lstDisplay.AddItem "Creating Database Object"

Set objDatabase = CreateObject("ACTOLE.DATABASE")

 

'Open the database

lstDisplay.AddItem "Opening Database"

objDatabase.Open dbName

 

'Assign the correct table object

Set objGroup = objDatabase.GROUP

 

If objDatabase.IsOpen Then

   objGroup.SetContactScope strContactID

   lstDisplay.AddItem objGroup.recordCount & " found for the Contact"

   Set objGroup = Nothing

   objDatabase.Close

   lstDisplay.AddItem "Database Closed"

End If

 

Set objDatabase = Nothing

ListTable object methods

The ListTable object, which requires ACT! 2000 or later, contains product, product type, and main competitor data for use by the Sales object. The following methods apply only to the ListTable object. See “Common properties and methods” in this section for additional properties and methods that apply to the ListTable object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

ClearScope

None

 

Void

GetScope

None

 

Short Integer

SetScope

iScopeType

Short Integer

Void

ClearScope Method (requires ACT! 2000 or later)

Description    Clears the current scope set on the table, resets the current record position to the first record, and rebuilds the list of ListTable records without any scoping.

Object            ListTable

Syntax            object.GetScope

Return type   Void

See also         GetScope, SetScope

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objList = objDatabase.ListTable

   'Get the current scoping on the List table.

   'If it is not 0 (no scoping), then clear the current scope.

   If objList.GetScope <> 0 then

       objList.ClearScope

   End if

Set objList = Nothing

End if

 

Set objDatabase = Nothing

GetScope Method (requires ACT! 2000 or later)

Description    Returns a short integer specifying the current scope type set on the table, such as Product, Product Type, or Competitor.

Object            ListTable

Syntax            object.GetScope

Return type   Short Integer

Comments     The following values are returned by this method:

Value

Scope type

 

Value

Scope type

0

No Type

 

2

Product Type

1

Product

 

3

Competitor

See also         ClearScope, SetScope

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

 

objDatabase.Open dbName

If objDatabase.IsOpen Then

   Set objList = objDatabase.ListTable

   'Get the current scoping on the List table.

   'If it is not 0 (no scoping), then clear the current scope.

   If objList.GetScope <> 0 then

       objList.ClearScope

   End if

Set objList = Nothing

End if

 

Set objDatabase = Nothing

SetScope Method (requires ACT! 2000 or later)

Description    Sets the scope to only read a specific type of sales data, such as Product, Type, or Competitor.

Object            ListTable

Syntax            object.SetScope (iScopeType)

Parameters    iScopeType      A short integer specifying the type of sales data to read.

Following is a list of values for this parameter:

Value

Scope type

 

Value

Scope type

0

No Type

 

2

Product Type

1

Product

 

3

Competitor

Return type   Void

See also         ClearScope, GetScope

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objList = objDatabase.ListTable

   'Set the scope to product.

   objList.SetScope 1

   List1.AddItem  "Products in ListTable are"

   For lcounter = 1 To objList.recordCount

       List1.AddItem objList.Data (LTF_Name)

       objList.MoveNext

   Next lcounter

End if

 

Set objList = Nothing

Set objDatabase = Nothing

Members object properties

The Members object is automatically generated each time you access a group record. This object is a list of all contacts that belong to the current group. The Members object is only valid if the number of contacts for that group exceeds 0. The members object is no longer valid after a call to any group method that affects the record position in a group list. For example, you should call Group.MoveNext then call Group.Members.

The following properties apply only to the Members object. See “Common properties and methods” in this section for additional properties and methods that apply to the Members object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Name

None

 

String

Read Only

UniqueId

None

 

String

Read Only

The following sample code demonstrates how to use the Members object:

'Create the object

Set objData = CreateObject("ACTOLE.DATABASE")

 

'Open the database

objData.Open dbName

 

'Assign the correct table object

Dim tableObject As Object

Set tableObject = objData.CONTACT

 

If objData.IsOpen Then

   objData.Group.MoveFirst() 'move to the first group record.

 

   'The contact count

   If objData.Group.ContactCount > 0 Then

 

       'Define an object variable to access the members object

       dim members As Object

       Set members = objData.Group.Members

 

       'Enumerate all contacts

       For Index = 1 To objData.Group.ContactCount

          Dim uniqueID As String

          uniqueID = members.uniqueID

 

          'Seek to actual members Contact record and display information

          objData.CONTACT.GoTo (uniqueID)

 

          For lCounter = 1 To (tableObject.FieldCount)

              length = Len(tableObject.Data

                 ( tableObject.FIELDS.fieldIDAt(1Counter)))

              If (length > 0) Then

                 MsgBox tableObject.Data

                     (tableObject.FIELDS.fieldIDAt(lCounter))

              End If

          Next

       Next Index

   End If

End If

Note:   This example assumes that you are logging on to a single-user database.

Name Property

Description    Returns the contact name of the group member.

Object            Members

Syntax            object.Name

Value type      String, Read Only

UniqueId Property

Description    Returns the contact Unique ID of the group member.

Object            Members

Syntax            object.UniqueId

Value type      String, Read Only

NoteHistory object methods

The NoteHistory object contains notes and historical information for the active Database object. The following methods apply only to the NoteHistory object. See “Common properties and methods” in this section for additional properties and methods that apply to the NoteHistory object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

ClearAttachmentFilter

None

 

Void

ClearContactScope

None

 

Void

ClearGroupScope

None

 

Void

ClearHistoryFilter

None

 

Void

ClearNoteFilter

None

 

Void

SetAttachmentFilter

None

 

Void

SetContactScope

szUniqueID

String

Void

SetGroupScope

szUniqueID

String

Void

SetHistoryFilter

None

 

Void

SetNoteFilter

None

 

Void

History types

When writing to the type field of the NoteHistory object, you can use one of the following ID types to generate a history item.

ID type

Field name

Regarding text

0

HT_CallAttempt

Call Attempted

1

HT_CallComplete

Call Completed

2

HT_CallReceived

Call Received

3

HT_FieldChanged

Field Changed

5

HT_LetterSent

Letter Sent

6

HT_MeetingDone

Meeting Held

7

HT_MeetingNotDone

Meeting Not Held

8

HT_ToDoDone

To-do Done

9

HT_ToDoNotDone

To-do Not Done

10

HT_Timer

Timer

11

HT_CallErased

Call Erased

12

HT_DeletedContact

Contact Deleted

13

HT_UpdateContact

Update Contact

14

HT_UpdateConAct

Update Activity

15

HT_UpdateDelAct

Delete Activity

16

HT_MsgMailSent

E-mail Sent

17

HT_CallLeftMessage

Call Left Message

50

HT_FaxSent

Fax Sent

51

HT_SyncSent

Sent Sync

52

HT_SyncReceived

Received Sync

53

HT_ReplaceFieldsLog

Replace Fields Log

54

HT_TODOErased

To-do Erased

55

HT_MeetingErased

Meeting Erased

56

HT_Error

Error

57

HT_SaleWon

Closed/Won Sale

58

HT_SaleLost

Lost Sale

100

HT_Note

Note

101

HT_Attachment

Attachment

102

HT_Email

E-mail

ClearAttachmentFilter Method

Description    Clears an existing attachment filter and rebuilds a list of Notes/History records that include any Attachment type records.

Object            NoteHistory

Syntax            object.ClearAttachmentFilter

Return type   Void

See also         SetAttachmentFilter

ClearContactScope Method

Description    Clears any existing contact scoping. Resets the current record position to the first record and rebuilds the list of Notes/History records without applying contact scoping.

Object            NoteHistory

Syntax            object.ClearContactScope

Return type   Void

See also         SetContactScope

ClearGroupScope Method

Description    Clears any existing group scoping. Resets the current record position to the first record and rebuilds a list of Notes/History records without applying group scoping.

Object            NoteHistory

Syntax            object.ClearGroupScope

Return type   Void

See also         SetGroupScope

ClearHistoryFilter Method

Description    Clears an existing history filter. Clears an existing history filter and rebuilds a list of Notes/History records that include History type records.

Object            NoteHistory

Syntax            object.ClearHistoryFilter

Return type   Void

See also         SetHistoryFilter

ClearNoteFilter Method

Description    Clears an existing note filter and rebuilds a list of Notes/History records that include Note type records.

Object            NoteHistory

Syntax            object.ClearNoteFilter

Return type   Void

See also         SetNoteFilter

SetAttachmentFilter Method

Description    Narrows the current set of Notes/History records by filtering out Attachment type Notes/History records. You can apply this scoping method along with other scoping methods and filters.

Object            NoteHistory

Syntax            object.SetAttachmentFilter

Return type   Void

See also         ClearAttachmentFilter

SetContactScope Method

Description    Narrows the current set of Notes/History records to the Notes/History records for the contact record with the specified Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            NoteHistory

Syntax            object.SetContactScope szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of a contact record.

Return type   Void

See also         ClearContactScope

Example         dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

'Get a contact record Unique ID

dim uniqueID as string

objData.CONTACT.MoveFirst

uniqueID = objData.CONTACT.DATA(CF_UniqueID)

 

'Apply contact scoping to current list of Notes and Histories

objData.NOTEHISTORY.MoveFirst

objData.NOTEHISTORY.SetContactScope(uniqueID)

 

objData.Close

set objData = Nothing

SetGroupScope Method

Description    Narrows the current set of Notes/History records to the Notes/History records for the group with the specified Group record Unique ID. You can apply this scoping method along with other scoping methods and filters.

Object            NoteHistory

Syntax            object.SetGroupScope szUniqueID

Parameters    szUniqueID            A string that specifies the Unique ID of a group record.

Return type   Void

See also         ClearGroupScope

SetHistoryFilter Method

Description    Narrows the current set of Notes/History records by filtering out History type Notes/History records. You can apply this scoping method along with other scoping methods and filters.

Object            NoteHistory

Syntax            object.SetHistoryFilter

Return type   Void

See also         ClearHistoryFilter

SetNoteFilter Method

Description    Narrows the current set of Notes/History records by filtering out Note type Notes/History records. You can apply this scoping method along with other scoping methods and filters.

Object            NoteHistory

Syntax            object.SetNoteFilter

Return type   Void

See also         ClearNoteFilter

PopupInfo object properties and methods

The PopupInfo object contains the popup information for a field. The following properties and methods apply only to the PopupInfo object. See “Common properties and methods” in this section for additional properties that apply to the PopupInfo object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type(s)

Access

PopupCount

None

 

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Add

szValue [, szRemark]

String, String

Void

Clear

None

 

Void

Remark

iIndex

Short Integer

String

Remove

iIndex

Short Integer

Void

Value

iIndex

Short Integer

String

Add Method

Description    Adds a popup item to a field that has the popup type turned on. If a field does not have the Allow Editing option for the drop-down list selected, it is not possible to add a drop-down list item.

Caution: The database should be locked before using this method; otherwise, an error is returned.

Object            PopupInfo

Syntax            object.Add szValue [, szRemark]

Parameters    szValue                  A string that specifies the value of the popup item.

[, szRemark]           A string that specifies the popup item’s remark, which is the text listed to provide information about the value. For example, the value of CA has the remark text of California. Omit optional parameter to get the remark for the popup item.

Return type   Void

Clear Method

Description    Clears all the items in a drop-down list, resulting in an empty list.

Caution: The database should be locked before using this method; otherwise, an error is returned.

Object            PopupInfo

Syntax            object.Clear

Return type   Void

PopupCount Property

Description    Returns the number of popup items in a PopupInfo object.

Object            PopupInfo

Syntax            object.PopupCount

Value type      Short Integer, Read Only

Example         'This example demonstrates how to retrieve popup information.

 

dim objData as object

Set objData = CreateObject("ACTOLE.DATABASE")

objData.Open dbName

 

Dim tableObject As Object

Set tableObject = objData.ACTIVITY

 

dim PopupInfo as object

set PopupInfo = tableObject.Fields.POPUPINFO(AF_REGARDING,0)

   'Must be a valid field value

 

Dim I as Integer

nCount = PopupInfo.PopupCount

for I = 0 to (nCount - 1)

   list1.additem "Remark: " & PopupInfo.Remark(I)

   list1.additem "Value: " & PopupInfo.Value(I)

next I

 

set PopupInfo = Nothing

objData.Close

set objData = Nothing

Remark Method

Description    Returns a string of text containing the remark for the drop-down list item with the specified index. The remark provides information about the popup item. For example, the value of CA has the remark text of California.

Object            PopupInfo

Syntax            object.Remark iIndex

Parameters    iIndex                    A short integer that specifies the index number for the drop-down list item, in the range from 0 to one less than the value of PopupCount.

Return type   String

Example         See PopupCount

Remove Method

Description    Removes the popup item with the specified index from a drop-down list.

Caution: The database should be locked before using this method; otherwise, an error is returned.

Object            PopupInfo

Syntax            object.Remove iIndex

Parameters    iIndex                    A short integer that specifies the index number for the popup item, in the range from 0 to one less than the value of PopupCount.

Return type   Void

Example         See PopupCount

Value Method

Description    Returns a string containing the drop-down list item value for the popup item with the specified index number. The value in a drop-down list item is the data that is placed into a field in ACT! when an item is chosen from the drop-down list. For example, the value of CA, which is place into a field, has the remark text of California.

Object            PopupInfo

Syntax            object.Value iIndex

Parameters    iIndex                    A short integer that specifies the index number for the popup item, in the range from 0 to PopupCount.

Return type   String

Relations object properties and methods

The Relations object contains relational information between table objects of the active Database object. The following properties and methods apply only to the Relations object. See “Common properties and methods” in this section for additional properties that apply to the Relations object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Count

None

 

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

GetColumn1ID

iIndex

Short Integer

Short Integer

GetColumn2ID

iIndex

Short Integer

Short Integer

GetRelationTable

iIndex

Short Integer

Short Integer

GetRelationType

iIndex

Short Integer

Short Integer

GetTable1ID

iIndex

Short Integer

Short Integer

GetTable2ID

iIndex

Short Integer

Short Integer

UsesRelationTable

iIndex

Short Integer

Boolean

The following sample code demonstrates how to use the Relations object:

'The following code lists the different methods in the Relations object.

Dim objDatabase As Object

Dim lcounter As Long

 

'Clear the listbox

List1.Clear

 

'Create the object

List1.AddItem "Creating Database Object"

Set objDatabase = CreateObject("ACTOLE.DATABASE")

 

'Open the database

List1.AddItem "Opening Database"

objDatabase.Open dbName

List1.AddItem "Is Open: " & objDatabase.IsOpen

 

'Assign the correct table object

Dim objRelation As Object

Dim iRelCount As Integer

Dim i As Integer

 

'Check the version. If not 1 only then proceed

If objDatabase.MajorVersion <> 1 Then

   Set objRelation = objDatabase.Relations

   'Get the number of relations in the object

   iRelCount = objRelation.Count

   List1.AddItem "No Of relations: " & iRelCount

 

       If objDatabase.IsOpen Then

          For i = 0 To iRelCount - 1

              List1.AddItem objRelation.GetTable1ID(i) & ":" &

                 objRelation.GetColumn1ID(i) & ":" &

                 objRelation.GetTable2ID(i)   & ":" &

                 objRelation.GetColumn2ID(i)  & ":" &

                 objRelation.GetRelationType(i)  & ":" &

                 objRelation.UsesRelationTable(i)

          Next i

          List1.AddItem "Closing Database"

          Set objRelation = Nothing

          objDatabase.Close

          List1.AddItem "Database Closed"

       End If

 

Else

   MsgBox "Relations Object is not available in this version of ACTOLE."

       + Chr(10) + "Please update to version 3.0.6 or greater."

   objDatabase.Close

End If

 

'Clear the object

Set objDatabase = Nothing

List1.SetFocus

Count Property (requires ACT! 3.0.6 or later)

Description    Returns the number of relations in the Relations object.

Object            Relations

Syntax            object.Count

Value type      Short Integer, Read Only

GetColumn1ID Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer that contains the value in Column1ID of the first table, for the item with the specified index number.

Object            Relations

Syntax            object.GetColumn1ID iIndex

Parameters    iIndex                    A short integer that specifies the index number of the item, in the range from 0 to 1 less than the value of Count.

Return type   Short Integer

GetColumn2ID Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer for the value in Column1ID of the second table, for the item with the specified index number.

Object            Relations

Syntax            object.GetColumn2ID iIndex

Parameters    iIndex                    A short integer that specifies the index of the item, in the range from 0 to 1 less than the value of Count.

Return type   Short Integer

GetRelationType Method

Description    Returns a short integer that contains the relation type for the object table, for the item with the specified index number.

Object            Relations

Syntax            object.GetRelationType iIndex

Parameters    iIndex                    A short integer that specifies the index number of the item, in the range from 0 to 1 less than the value of Count.

Return type   Short Integer

Comments     The value returned by this property represents the following table relationships:

Value

Relationship

 

Value

Relationship

1

One_To_One

 

3

Many_To_One

2

One_To_Many

 

4

Many_To_Many

GetTable1ID Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer that contains the value in Table1ID for the first table.

Object            Relations

Syntax            object.GetTable1ID iIndex

Parameters    iIndex                    A short integer that specifies the index number of the item, in the range from 0 to 1 less than the value of Count.

Return type   Short Integer

GetTable2ID Method (requires ACT! 3.0.6 or later)

Description    Returns a short integer for the value in Table1ID for the second table, for the item with the specified index number.

Object            Relations

Syntax            object.GetTable2ID iIndex

Parameters    iIndex                    A short integer that specifies the index number of the item, in the range from 0 to 1 less than the value of Count.

Return type   Short Integer

UsesRelationTable Method (requires ACT! 3.0.6 or later)

Description    Returns True if the relation uses the Relational table or False if it does not use the Relational table.

Object            Relations

Syntax            object.UsesRelationTable iIndex

Parameters    iIndex                    A short integer that specifies the index number of the item, in the range from 0 to 1 less than the value of Count.

Return type   Boolean

Comments     The Relational table has three fields: Reltype, ColumnID1, ColumnID2. Most of the many-to-many relations are stored as records in the Relational table. Relationships between Group table items and Activity table items, for example, are not stored in the Relation table. There are methods in the table objects to set the scope with respect to another table. These methods use the information in the Relation table to set the scope.

Sales object methods

The Sales object, which requires ACT! 2000 or later, contains data for sales process management for the active Database object. The following methods apply only to the Sales object,. See “Common properties and methods” in this section for additional properties and methods that apply to the Sales object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

AssociateWithContact

szUniqueID

String

Void

AssociateWithGroup

szUniqueID

String

Void

CompleteSale

iStatus,closeDate, szReason

Short Integer, Date, String

Void

ReopenSale

None

 

Void

AssociateWithContact Method (requires ACT! 2000 or later)

Description    Associates the current sales record with the specified contact.

Object            Sales

Syntax            object.AssociateWithContact (szUniqueID)

Parameters    szUniqueID            A string that specifies the Unique ID of a contact record.

Return type   Void

See also         AssociateWithGroup, CompleteSale, ReopenSale

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objSales = objDatabase.SALES

   'New Sales record

   objSales.Add

   objSales.Data SLF_SaleStartDate, startDate

   objSales.Data SLF_SaleDate, closedate

   'These need to be IDs from the List table

   objSales.Data SLF_ProductId, sProductId

   'These need to be IDs from the List table

   objSales.Data SLF_TypeId, sTypeId

   objSales.Data SLF_Units, 100

   objSales.Data SLF_UnitPrice,2.25

   objSales.Data SLF_Amount, 225.00

   objSales.Data SLF_Probability, 65

   'These need to be IDs from the List table

   objSales.Data SLF_CompetitorId, CompetitorId

   objSales.Data SLF_SalesStage, " Confirmed order on phone,

       waiting for written order"

 

   'Update the contents of the record

   uniqueID = objSales.Update

   objSales.GoTo (uniqueID)

 

   If objSales.Error Then

       MsgBox objSales.LastError

   End If

 

'Make the association between a contact and an activity

objSales.AssociateWithContact sContactId

objSales.AssociateWithGroup sGroupId

Set objSales = Nothing

 

End If

Set objDatabase = Nothing

AssociateWithGroup Method (requires ACT! 2000 or later)

Description    Associates the current sales record with the specified group.

Object            Sales

Syntax            object.AssociateWithGroup (szUniqueID)

Parameters    szUniqueID            A string that specifies the Unique ID of a group record.

Return type   Void

See also         AssociateWithContact, CompleteSale, ReopenSale

Example         Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objSales = objDatabase.SALES

   'New Sales record

   objSales.Add

   objSales.Data SLF_SaleStartDate, startDate

   objSales.Data SLF_SaleDate, closedate

   'These need to be IDs from the List table

   objSales.Data SLF_ProductId, sProductId

   'These need to be IDs from the List table

   objSales.Data SLF_TypeId, sTypeId

   objSales.Data SLF_Units, 100

   objSales.Data SLF_UnitPrice,2.25

   objSales.Data SLF_Amount, 225.00

   objSales.Data SLF_Probability, 65

   'These need to be IDs from the List table

   objSales.Data SLF_CompetitorId, CompetitorId

   objSales.Data SLF_SalesStage, " Confirmed order on phone,

       waiting for written order"

 

   'Update the contents of the record

   uniqueID = objSales.Update

   objSales.GoTo (uniqueID)

 

   If objSales.Error Then

       MsgBox objSales.LastError

   End If

 

'Make the association between a contact and an activity

objSales.AssociateWithContact sContactId

objSales.AssociateWithGroup sGroupId

Set objSales = Nothing

 

End If

Set objDatabase = Nothing

CompleteSale Method (requires ACT! 2000 or later)

Description    Completes the current sale.

Object            Sales

Syntax            object.CompleteSale (iStatus, closeDate, szReason)

Parameters    iStatus                    A short integer that specifies the status of the sale.

Following is a list of values for this parameter:

Value

Status

 

Value

Status

0

Open

 

2

Lost

1

Won

 

 

 

 

closeDate               A Date value that specifies the date that the sale closed, formatted in Windows Regional Settings Short Date style.

szReason                A string with a maximum length of 65 characters that specifies why the sale was won or lost.

Return type   Void

See also         AssociateWithContact, AssociateWithGroup, ReopenSale

Example         'The following code goes to the required sales record, checks to
'make sure it is a Sales Opportunity, then completes it as a Won
'sale with today's date as the close date and "Liked the sample and
'price" as the reason.

 

Dim objDatabase As Object

Dim objSales As Object

Dim suid as string

 

'Create the Database object and open a database

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objSales = objDatabase.SALES

 

   objSales.goto suid   'Go to the Sales record you want to complete

   'If the status of the sale is a Sales Opportunity, then complete it

   If objSales.Data(SLF_Status) = "Sales Opportunity" Then

       'Complete it as a Closed/Won sale, with today's date as the

       'close date and the reason is "Liked the sample and price

       objSales.CompleteSale 1, Now, "Liked the Sample and price "

       'Check for errors

       If objSales.Error Then

          MsgBox objSales.LastError

       End If

   End If

 

'Close the objects

Set objSales = Nothing

objDatabase.close

 

End If

 

'Clear the object

Set objDatabase = Nothing

ReopenSale Method (requires ACT! 2000 or later)

Description    Reopens the current sale, setting the status to open.

Object            Sales

Syntax            object.ReopenSale

Return type   Void

See also         AssociateWithContact, AssociateWithGroup, CompleteSale

Example         'The following code goes to the required sales record, checks to
'make sure it is not a Sales Opportunity, then reopens it.

Dim objDatabase As Object

Dim objSales As Object

Dim suid as string

 

'Create the Database object and open a database

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

   Set objSales = objDatabase.SALES

   objSales.goto suid   'Go to the Sales record you want to reopen

   'If the status of the sale is not a Sales Opportunity, then reopen it

   If objSales.Data(SLF_Status) <> "Sales Opportunity" Then

       objSales.ReopenSale

       'Check for errors

       If objSales.Error Then

          MsgBox objSales.LastError

       End If

   End If

 

'Close the objects

Set objSales = Nothing

objDatabase.close

 

End If

 

'Clear the object

Set objDatabase = Nothing

Users object properties and methods

The Users object contains the user information for the active Database object. The following properties and methods apply only to the Users object. See “Common properties and methods” in this section for additional properties that apply to the Users object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Access

iUser [= lType]

Short Integer, Long Integer

Long Integer

Read/Write

Count

None

 

Short Integer

Read Only

Exists

szName

String

Boolean

Read Only

Name

iUser

Short Integer

String

Read Only

Security

iUser [= lValue]

Short Integer, Long Integer

Long Integer

Read/Write

UniqueId

iUser

Short Integer

String

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

AddUser

szName, szPassword, iPrivilege

String, String,
Short Integer

Boolean

CheckIsPhonebook

None

 

Boolean

CurrentUserAccess

None

 

Long Integer

CurrentUserId

None

 

String

CurrentUserName

None

 

String

CurrentUserSecurity

None

 

Long Integer

GetPassword

iUser

Short Integer

String/BSTR

IsValidPassword

iUser, szPassword

Short Integer, String

Boolean

SetAsPhonebook

None

 

Boolean

SetPassword

iUser, szOldPassword, szNewPassword

Short Integer, String,
String

Void

Access Property

Description    Gets and sets the access type of the specified user for the open database.

Object            Users

Syntax            object.Access iUser [= lType]

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

[= lType]                A long integer that specifies the access type, in the range of 1 to 5. Omit this optional parameter to get the access type for the specified user.

Value type      Long Integer, Read/Write

Comments     This property returns or sets one of the following values for the access type of the specified user of the open database.

Value

Description

1

Logon access to the database is enabled for the selected user. Synchronization access is not enabled for the selected user.

2

Synchronization access to the database is enabled for the specified user. Logon access is not enabled for the selected user.

3

No access to the database is enabled for the selected user.

4

Direct synchronization access to the database has been set up for the selected user.

5

Logon access and synchronization access to the database is enabled for the selected user.

See also         Count

AddUser Method (requires ACT! 4.0 or later)

Description    Adds a new user with a specified security level to an ACT! database. The current user must have Administrator security level to add new users. Returns True if the operation is successful or False if unsuccessful.

Note: Before using this method, make sure the database is not open in the ACT! application or by another instance of OLE.

Object            Users

Syntax            object.AddUser szName, szPassword, iPrivilege

Parameters    szName                  A string that specifies the new user’s logon name.

szPassword            A string that specifies the initial password for the new user.

iPrivilege               A long integer that specifies the security level for the new user.

                              Following is a list of values for the iPrivilege parameter:

Value

Description

1

Browse (read-only permission). Can read the records in the database. Cannot add, modify, or delete records.

3

Standard (update, read/write permission on standard functions). Can read the records in the database and can add, delete, and modify records. Cannot add new users to the database, synchronize with another database or user, perform maintenance on the database, or modify the database fields.

5

Administrator (full update and read/write permission). Can perform any database function, including adding new users, synchronizing data, performing database maintenance, and modifying the database fields.

Return type   Boolean

See also         SetAsMyRecord in Contact object

Example         'Example of adding a user to an ACT! database.

 

Dim objDatabase As Object

Dim objContact As Object

Dim objUsers As Object

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open(C:\My Documents\ACT\Database\ACT5demo.dbf)

Set objUsers = objDatabase.Users

 

'Add user "Simon Lazarus" with password "password" and

'security level "1" for browse

if objUsers.AddUser("Simon Lazarus", "password", 1) = True

   then

   MsgBox("Simon Lazarus added successfully");

ElseIf

   MsgBox("Failed adding Simon Lazarus as a database user.");

EndIf

 

objDatabase.Close

Set objDatabase = Nothing

CheckIsPhonebook Method (requires ACT! 4.0 or later)

Description    Returns True if the ACT! database is specified in WinFax as an external phonebook or False if it is not specified as a WinFax phonebook.

Note: This method requires WinFax 8.02 or later. False is returned if WinFax 8.02 or later is not installed.

Object            Users

Syntax            object.CheckIsPhonebook

Return type   Boolean

See also         SetAsPhonebook

Example         'Check if the open database is being used as the WinFax phonebook

'If not, set it as the phonebook for WinFax

 

Dim objDatabase As Object

Dim i As Integer

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open dbName

 

If objDatabase.IsOpen Then

'If the database is not being used as a WinFax Phonebook,

'Set it to be used as one.

   If objDatabase.USERS.CheckIsPhonebook <> True Then

       i = objDatabase.USERS.SetAsPhonebook

          If i = True Then

              lstDisplay.AddItem "Setting successful"

          Else

              lstDisplay.AddItem "Setting unsuccessful"

          End If

       End If

   objDatabase.Close

End If

 

'Clear the object

Set objDatabase = Nothing

Count Property

Description    Returns the number of registered users for the database. This number includes only the users who have created a My Record contact record by previously logging on to the ACT! database. Any users who do not have logon access to the database are not included.

Object            Users

Syntax            object.Count

Value type      Short Integer, Read Only

CurrentUserAccess Method (requires ACT! 3.0.6 or later)

Description    Returns a long integer containing the access type of the current user of the open database.

Object            Users

Syntax            object.CurrentUserAccess

Return type   Long Integer

Comments     This method returns one of the following values:

Value

Description

1

Logon access to the database is enabled for the selected user. Synchronization access is not enabled for the selected user.

2

Synchronization access to the database is enabled for the specified user. Logon access is not enabled for the selected user.

4

Direct synchronization access to the database has been set up for the selected user.

5

Logon access and synchronization access to the database is enabled for the selected user.

See also         CurrentUserId, CurrentUserName, CurrentUserSecurity

CurrentUserId Method (requires ACT! 3.0.6 or later)

Description    Returns a string containing the Unique ID of the current user of the open database.

Object            Users

Syntax            object.CurrentUserId

Return type   String

See also         CurrentUserAccess, CurrentUserName, CurrentUserSecurity

CurrentUserName Method (requires ACT! 3.0.6 or later)

Description    Returns a string containing the user name of the current user of the open database.

Object            Users

Syntax            object.CurrentUserName

Return type   String

See also         CurrentUserAccess, CurrentUserId, CurrentUserSecurity

CurrentUserSecurity Method (requires ACT! 3.0.6 or later)

Description    Returns a long integer containing the security level of the current user of the open database.

Object            Users

Syntax            object.CurrentUserSecurity

Return type   Long Integer

Comments     This method returns one of the following values:

Value

Description

1

Browse (read-only permission). Can read the records in the database. Cannot add, modify, or delete records.

3

Standard (update, read/write permission on standard functions). Can read the records in the database and can add, delete, and modify records. Cannot add new users to the database, synchronize with another database or user, perform maintenance on the database, or modify the database fields.

5

Administrator (full update and read/write permission). Can perform any database function, including adding new users, synchronizing data, performing database maintenance, and modifying the database fields.

See also         CurrentUserAccess, CurrentUserId, CurrentUserName

Exists Property

Description    Returns True if the specified user exists in the database or False if the user is not in the database. This property verifies whether or not a contact record exists for the user. The user’s name is the logon name, not the Contact field value from the corresponding ACT! database record.

Object            Users

Syntax            object.Exists szName

Parameters    szName                  A string that specifies the user’s logon name.

Value type      Boolean, Read Only

GetPassword Method (requires ACT! 4.0 or later)

Description    Gets the password of specified user(s). The current user must have an Administrator security level to get user passwords. A password is returned as a string.

Object            Users

Syntax            object.GetPassword iUser

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

Return type   String/BSTR

See also         Count

Example         'Example of getting the passwords of users of an ACT! database.

 

Dim objDatabase As Object

Dim objContact As Object

Dim objUsers As Object

Dim uCount As Integer

 

Set objDatabase = CreateObject("ACTOLE.DATABASE")

objDatabase.Open(C:\My Documents\ACT\Database\ACT5demo.dbf)

Set objUsers = objDatabase.Users

 

'Get the count of users.

uCount = objUsers.Count

 

'Now display the name and password of all users for the database.

for iLoop = 1 to uCount

List1 .Additem "Password for user: " & objUsers.Name(iLoop) & " is: " &

   objUsers.GetPassword(iLoop)

next iLoop

 

objDatabase.Close

Set objDatabase = Nothing

IsValidPassword Method

Description    Returns True if the specified password is valid for the specified user or False if the password is invalid or the specified user does not have a password.

Object            Users

Syntax            object.IsValidPassword iUser, szPassword

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

szPassword            A string that specifies the user’s current password.

Return type   Boolean

See also         Count

Name Property

Description    Returns the user name of the specified user. The user’s name is the logon name, not the Contact field value from the corresponding ACT! database record.

Object            Users

Syntax            object.Name iUser

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

Value type      String, Read Only

See also         Count

Security Property

Description    Gets and sets the security level of the specified user.

Object            Users

Syntax            object.Security iUser [= lValue]

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

[= lValue]              A long integer that specifies the security level for the specified user. Omit this optional parameter to get the security level for the specified user.

Value type      Long Integer, Read/Write

Comments     This property gets or sets one of the following values:

Value

Description

1

Browse (read-only permission). Can read the records in the database. Cannot add, modify, or delete records.

3

Standard (update, read/write permission on standard functions). Can read the records in the database and can add, delete, and modify records. Cannot add new users to the database, synchronize with another database or user, perform maintenance on the database, or modify the database fields.

5

Administrator (full update and read/write permission). Can perform any database function, including adding new users, synchronizing data, performing database maintenance, and modifying the database fields.

See also         Count

SetAsPhonebook Method (requires ACT! 4.0 or later)

Description    Sets an ACT! database as an external phonebook for WinFax. Returns True if the operation is successful or False if unsuccessful.

Note: This method requires WinFax 8.02 or later. False is returned if WinFax 8.02 or later is not installed.

Object            Users

Syntax            object.SetAsPhonebook

Return type   Boolean

See also         CheckIsPhonebook

Example         See the example for the CheckIsPhonebook method in this section.

SetPassword Method

Description    Sets the password for the specified user. To change the user’s password, you must know the user’s current password.

Object            Users

Syntax            object.SetPassword iUser, szOldPassword, szNewPassword

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

szOldPassword      A string that specifies the user’s current password.

szNewPassword     A string that specifies the user’s new password.

Return type   Void

See also         Count, IsValidPassword

UniqueId Property

Description    Returns the Unique ID of the specified user’s contact record in the ACT! database.

Object            Users

Syntax            object.UniqueId iUser

Parameters    iUser                      A short integer that specifies the ordinal user number, in the range between 1 and Count.

Value type      String, Read Only

See also         Count


CHAPTER

OLE Database Object Error Codes

The following error codes apply only to the ACT! application. If an error occurs that is not caused by the OLE automation client’s code, please record the return value and the situation that caused it for use by technical support.

Value

Error code

Description

-2000

Status_Obsolete

for obsolete calls

-1999

Status_InvalidParam

invalid parameter

-1500

Status_SecurityLocked

the security is currently locked

-1499

Status_SecurityEditFailed

general error trying to edit security

-1000

Status_CantDeleteUser

cannot delete a user record

-750

Status_CantEdit

cannot edit

-500

Status_DataLocked

the record is locked

-499

Status_DataNotLocked

the record is not locked

-498

Status_DataEditNow

the record is being edited

-497

Status_DataUninitialized

the record has not been initialized

-496

Status_ListUninitialized

the table has not been initialized

-495

Status_DataDeleted

the record has been deleted

-494

Status_DataChanged

the record has changed

-493

Status_CantLockData

the record cannot be locked

-109

Status_ExceedLimit

limit has been exceeded

-108

Status_DBAccessDenied

database access is denied

-107

Status_CantEditData

the record cannot be edited

-106

Status_InvalidFieldType

invalid field type

-105

Status_InvalidSortField

invalid sort field

-104

Status_OutOfRange

the record/field is out of range

-103

Status_InvalidBufIndex

invalid buffer index

-102

Status_DataBeingEdited

the record is currently being edited

-101

Status_CantDeleteField

the field cannot be deleted

-100

Status_InvalidSchemaInfo

invalid schema information

-99

Status_InvalidFieldName

invalid field name

-98

Status_InvalidField

invalid field

-97

Status_CantEditAttr

the attribute cannot be edited

-96

Status_ExceedsMaxLength

maximum length exceeded

-95

Status_CantEditSchema

the schema information cannot be edited

-94

Status_DupeFieldName

duplicate field name

-93

Status_CantEditSecurity

the security information cannot be edited

-92

Status_InvalidId

invalid ID specified

-91

Status_DBSchemaCorrupt

the schema information is corrupted

-90

Status_DBDataCorrupt

the data file is corrupted

-89

Status_DBIndexCorrupt

the index file is corrupted

-88

Status_DBCreateFailed

create failed

-87

Status_DBOpenFailed

open failed

-86

Status_DBLockFailed

lock failed

-82

Status_IOFailed

read/write failed

-80

Status_CreateFailed

create failed

-79

Status_OpenFailed

open failed

-78

Status_DBInvalidVersion

invalid version to open database

-77

Status_Duplicate

duplication occurred

-76

Status_InvalidPrivilege

invalid permission

-75

Status_SharingViolation

sharing violation

-50

Status_InvalidFilename

filename invalid or not found

-10

Status_DBLocked

the database is locked

-9

Status_DBOpen

the database is already open

-8

Status_DBAlreadyOpen

the database is already open

-7

Status_DBNotOpen

the database is not open

-6

Status_FatalError

a fatal error occurred

-5

Status_OutofDiskSpace

insufficient disk space

-4

Status_Unimplemented

not implemented

-3

Status_OutofMemory

insufficient memory

-2

Status_Unsupported

feature not supported

-1

Status_GeneralError

a general error occurred

0

Status_Success

success

1

Status_Supported

supported

2

Status_NoMoreData

no more data available

3

Status_NoData

no data available

4

Status_NoCount

no count available

5

Status_PartialCount

partial count only available

6

Status_NoPosition

no position (BOF/EOF)

7

Status_PartialPosition

partial position

8

Status_Cancel

canceled

 


II


ACT! Software Development Kit (SDK)
Technical Reference Guide
ACT! OLE Application Object section

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Section II        ACT! OLE Application Object

Chapter 1       Getting Started with the OLE Application Object...................................... 195

Conventions used in this section......................................................................... 196

Syntax conventions...................................................................................... 196

Terminology................................................................................................ 196

Parameter types................................................................................................ 197

Special considerations....................................................................................... 197

Using properties in Visual C++...................................................................... 198

Changing the focus...................................................................................... 198

System requirements......................................................................................... 198

Development languages...................................................................................... 198

Using the Application Object with Visual C++................................................. 198

Example C++ code...................................................................................... 199

Understanding key files...................................................................................... 200

ACT! OLE Application Object model.................................................................... 201

What’s new....................................................................................................... 202

Changes for ACT! 4.0................................................................................... 202

Changes for ACT! 2000................................................................................. 204

Changes for ACT! 2000 version 5.0.2............................................................. 205

Chapter 2       Using Application Object Properties and Methods.................................. 207

Common properties and methods........................................................................ 208

Activate Method........................................................................................... 209

Active Property............................................................................................ 210

Application Method...................................................................................... 210

Caption Property.......................................................................................... 210

ClearError Method (requires ACT! 4.0 or later)................................................. 211

Close Method.............................................................................................. 211

CurrentFieldId Method (requires ACT! 2000 or later)......................................... 212

CurrentRecord Method (requires ACT! 2000 or later)........................................ 212

Displayed Property...................................................................................... 213

GetLastError Method.................................................................................... 213

GetMode Method (requires ACT! 2000 or later)............................................... 214

HasRecordChanged Method (requires ACT! 2000 or later)................................ 215

LookupKeyword Method (requires ACT! 2000 or later)...................................... 215

Maximize Method........................................................................................ 216

Minimize Method......................................................................................... 216

Name Property............................................................................................ 217

Parent Method............................................................................................. 217

ReSize Method............................................................................................ 217

Show Method.............................................................................................. 218

Type Property.............................................................................................. 219

Update Method............................................................................................ 219

ViewState Property (requires ACT! 2000 or later)............................................ 220

Application object properties and methods........................................................... 221

ActVersion Property (requires ACT! 2000 or later)........................................... 223

AddUser Method.......................................................................................... 224

BackupDB Method (requires ACT! 4.0 or later)................................................ 225

Caption Property.......................................................................................... 225

ChangePassword Method............................................................................. 226

ClearError Method (requires ACT! 4.0 or later)................................................. 227

CloseDB Method......................................................................................... 227

Command Method....................................................................................... 227

CompressDB Method................................................................................... 228

GetActiveDB Method (not currently implemented)........................................... 228

GetAppName Method................................................................................... 229

GetAppPath Method.................................................................................... 229

GetCurrentUserName Method (requires ACT! 4.0 or later)................................ 230

GetLastError Method.................................................................................... 230

GetOpenDBName Method............................................................................ 230

GetPosition Method..................................................................................... 231

GetSize Method.......................................................................................... 232

GetUserId Method........................................................................................ 232

GetUserPrivilege Method.............................................................................. 233

GetVersion Method (requires ACT! 4.0 or later)............................................... 233

Help Method................................................................................................ 234

IsDBOpen Method....................................................................................... 234

IsVisible Method.......................................................................................... 234

LastContactListModTime Property................................................................. 235

Maximize Method........................................................................................ 235

Minimize Method......................................................................................... 235

OpenDB Method.......................................................................................... 236

OpenFile Method......................................................................................... 236

Preferences Method..................................................................................... 237

ProcessFile Method..................................................................................... 237

PurgeHistories Method................................................................................. 238

PurgeNotes Method..................................................................................... 238

PurgeTransactions Method........................................................................... 239

ReIndexDB Method...................................................................................... 240

RemoveOutlookActivities Method (requires ACT! 2000 or later)......................... 241

ReSize Method............................................................................................ 241

RestoreDB Method (requires ACT! 4.0 or later)............................................... 242

RunMacro Method....................................................................................... 242

SaveCurrentLookup Method.......................................................................... 243

SendKey Method......................................................................................... 243

Show Method.............................................................................................. 244

Update Method............................................................................................ 245

UpdateOutlookActivities Method (requires ACT! 2000 or later).......................... 245

Views Method............................................................................................. 246

CalendarView object methods............................................................................. 247

GetActiveMonth Method............................................................................... 248

GetCalendarMode Method............................................................................ 248

SetActiveMonth Method............................................................................... 249

SetCalendarMode Method............................................................................ 249

ContactListView object methods......................................................................... 250

AddNewContact Method (obsolete)................................................................ 250

AddNewContactEx Method (requires ACT! 4.0 or later).................................... 250

GetGrid Method........................................................................................... 251

ContactView object methods.............................................................................. 253

Activities Method......................................................................................... 255

AddContactToGroup Method......................................................................... 255

AddNewActivity Method (obsolete)................................................................ 256

AddNewActivityEx Method (requires ACT! 4.0 or later)..................................... 257

AddNewContact Method............................................................................... 258

AddNoteHistory Method (obsolete)................................................................ 259

AddNoteHistoryEx Method (requires ACT! 4.0 or later).................................... 259

AttachFile Method (requires ACT! 4.0 or later)................................................ 261

BOL Method................................................................................................ 261

CompleteSale Method (requires ACT! 2000 or later)........................................ 262

CreateLookup Method (requires ACT! 2000 or later)......................................... 263

CreateSalesForecast Method (requires ACT! 2000 or later).............................. 263

Delete Method............................................................................................. 264

DeleteContactFast Method (requires ACT! 2000 or later).................................. 265

EOL Method................................................................................................ 265

GetActiveGroup Method............................................................................... 266

GetActiveGroupName Method....................................................................... 267

GetActiveTab Method................................................................................... 268

GetCount Method........................................................................................ 269

GetCurrentID Method................................................................................... 269

GetField Method.......................................................................................... 270

GetTabCount Method (requires ACT! 4.0 or later)............................................ 270

GetTabName Method (requires ACT! 4.0 or later)............................................ 271

Goto Method............................................................................................... 272

GroupMembership Method............................................................................ 272

LookupAll Method........................................................................................ 273

LookupField Method (obsolete)..................................................................... 273

LookupFieldEx Method (requires ACT! 4.0 or later).......................................... 273

LookupMyRecord Method............................................................................. 275

LookupPrevious Method............................................................................... 275

MoveFirst Method........................................................................................ 275

MoveLast Method........................................................................................ 276

MoveNext Method........................................................................................ 276

Moveprevious Method................................................................................... 276

NewContactDialog Method (requires ACT! 4.0 or later)..................................... 277

NotesHistory Method................................................................................... 277

RunQuery Method........................................................................................ 277

Sales Method (requires ACT! 2000 or later).................................................... 278

SaveQuery Method...................................................................................... 279

SelectContactDlg Method (requires ACT! 4.0 or later)...................................... 279

SetActiveGroup Method................................................................................ 280

SetActiveGroupName Method (requires ACT! 4.0 or later)................................ 281

SetActiveTab Method................................................................................... 281

SetField Method.......................................................................................... 281

TriggerActivitySeries Method (requires ACT! 2000 or later)............................... 282

EmailView object methods................................................................................. 284

GetActiveInbox Method................................................................................ 284

GetInboxCount Method................................................................................. 285

GetInboxName Method................................................................................. 285

GetOpenFolderMessageCount Method (requires ACT! 2000 or later)................. 286

MsgComposeView Method........................................................................... 286

OpenInbox Method....................................................................................... 287

SetActiveInbox Method................................................................................. 287

Sort Method (requires ACT! 2000 or later)....................................................... 288

ExplorerView object methods.............................................................................. 289

GetStartupURL Method................................................................................ 290

GetURL Method........................................................................................... 290

GoBack Method.......................................................................................... 290

GoForward Method...................................................................................... 291

Refresh Method........................................................................................... 291

SetURL Method........................................................................................... 291

Stop Method............................................................................................... 292

Grid object methods........................................................................................... 293

BOL Method................................................................................................ 294

DeleteRow Method....................................................................................... 295

EOL Method................................................................................................ 295

GetColumnCount Method............................................................................. 296

GetColumnID Method................................................................................... 297

GetColumnName Method............................................................................. 298

GetCurrentRow Method................................................................................ 299

GetField Method.......................................................................................... 299

GetFilter Method (requires ACT! 4.0 or later)................................................... 300

GetLastError Method.................................................................................... 302

GetRowCount Method.................................................................................. 302

GetRowNumber Method............................................................................... 303

GetUniqueID Method.................................................................................... 303

Goto Method............................................................................................... 303

MoveFirst Method........................................................................................ 304

MoveLast Method........................................................................................ 304

MoveNext Method........................................................................................ 305

Moveprevious Method................................................................................... 305

RefreshGrid Method..................................................................................... 305

SelectRow Method....................................................................................... 306

SetField Method.......................................................................................... 306

SetFilter Method (requires ACT! 4.0 or later)................................................... 307

Sort Method................................................................................................ 308

GroupView object methods................................................................................. 309

Activities Method......................................................................................... 310

AddMemberToGroup Method........................................................................ 311

AddNew Method.......................................................................................... 312

AddNewSubGroup Method (requires ACT! 2000 or later).................................. 313

AddNote Method (obsolete).......................................................................... 314

AddNoteEx Method (requires ACT! 4.0 or later)............................................... 314

AttachFile Method (requires ACT! 4.0 or later)................................................ 315

BOL Method................................................................................................ 316

ChangeToParentGroup Method (requires ACT! 2000 or later)............................ 316

ChangeToSubGroup Method (requires ACT! 2000 or later)................................ 317

Collapse Method (requires ACT! 2000 or later)................................................ 317

ContactMembers Method............................................................................. 318

Delete Method............................................................................................. 319

DeleteGroupFast Method (requires ACT! 2000 or later).................................... 319

EOL Method................................................................................................ 319

Expand Method (requires ACT! 2000 or later).................................................. 320

GetActiveTab Method................................................................................... 320

GetCount Method........................................................................................ 321

GetCurrentID Method................................................................................... 322

GetField Method.......................................................................................... 323

GetSubGroupCount Method (requires ACT! 2000 or later)................................ 323

GetTabCount Method (requires ACT! 4.0 or later)............................................ 324

GetTabName Method (requires ACT! 4.0 or later)............................................ 324

Goto Method............................................................................................... 324

GroupType Method (requires ACT! 2000 or later)............................................. 325

IsExpanded Method (requires ACT! 2000 or later)............................................ 325

LookupAll Method........................................................................................ 326

LookupField Method (obsolete)..................................................................... 326

LookupFieldEx Method (requires ACT! 4.0 or later).......................................... 326

LookupPrevious Method............................................................................... 327

MoveFirst Method........................................................................................ 327

MoveLast Method........................................................................................ 328

MoveNext Method........................................................................................ 328

Moveprevious Method................................................................................... 329

NotesHistory Method................................................................................... 329

RunQuery Method........................................................................................ 329

SaveQuery Method...................................................................................... 330

SetActiveTab Method................................................................................... 331

SetField Method.......................................................................................... 331

MailComposeView object methods...................................................................... 333

AddAttachment Method................................................................................ 334

AddBccRecepient Method (requires ACT! 2000 or later)................................... 335

AddCcRecepient Method (requires ACT! 2000 or later).................................... 336

AddRecepient Method.................................................................................. 336

ClearAll Method........................................................................................... 336

ClearAttachments Method............................................................................ 337

ClearBodyText Method................................................................................. 337

ClearRecepients Method.............................................................................. 337

ClearSubject Method.................................................................................... 338

Send Method............................................................................................... 338

SetBodyText Method................................................................................... 338

SetSubject Method...................................................................................... 339

Preferences object properties and methods.......................................................... 340

AttachMsgToContact Property (requires ACT! 4.0 or later)............................... 343

AttachToMsgUsing Property (requires ACT! 4.0 or later).................................. 344

CalendarStartTime Property.......................................................................... 345

CalendarWeekStartsOn Property.................................................................. 345

CalMinDurationForBanner Property (requires ACT! 4.0 or later)......................... 346

CheckScheduleConflicts Property................................................................. 348

ClearError Method (requires ACT! 4.0 or later)................................................. 349

ContactSalutation Property (requires ACT! 4.0 or later).................................... 349

DefaultContactLayout Property...................................................................... 350

DefaultGroupLayout Property........................................................................ 351

DisplayCountryCode Property....................................................................... 352

EnableSpeedLoader Property (requires ACT! 4.0 or later)................................. 353

ExitPrompt Property.................................................................................... 354

GenerateSynchReport Property (requires ACT! 4.0 or later).............................. 355

GetActivityCleanupStyle Method................................................................... 355

GetAttachmentInfo Method (requires ACT! 4.0 or later).................................... 356

GetCalendarIncrements Method.................................................................... 356

GetDataToSynch Method (requires ACT! 4.0 or later)...................................... 357

GetDBMaintReminderInfo Method (requires ACT! 2000 or later)........................ 358

GetDefaultApplication Method....................................................................... 359

GetDefaultLocation Method........................................................................... 359

GetEmailInboxSettings Method..................................................................... 360

GetEmailNewMsgInfo Method....................................................................... 361

GetEmailSystem Method (requires ACT! 4.0 or later)...................................... 362

GetLastError Method (requires ACT! 4.0 or later)............................................. 362

GetNameSettings Method............................................................................ 362

GetSchdActivityDefaults Method................................................................... 363

GetSchdAutoRollover Method....................................................................... 365

GetStyle Method......................................................................................... 366

GetSynchSchedule Method (obsolete)........................................................... 366

GetSynchScheduleInfo Method (requires ACT! 4.0 or later).............................. 367

GetSynchSettings Method............................................................................ 368

GetSynchUpdateInfo Method (requires ACT! 4.0 or later)................................. 368

NewActivitiesPrivate Property........................................................................ 369

NewActivitiesSeparate Property (requires ACT! 4.0 or later)............................. 370

NewContactsPrivate Property........................................................................ 371

NewGroupsPrivate Property.......................................................................... 372

PromptToPrintEnvelope Property (requires ACT! 4.0 or later)............................ 373

ReceivedSynchLocation Property (requires ACT! 4.0 or later)........................... 374

RememberPassword Property....................................................................... 374

RemindToBackup Property (requires ACT! 4.0 or later).................................... 375

ReturnReceipt Property (requires ACT! 4.0 or later)......................................... 376

SecondGroupColumn Property...................................................................... 377

SetActivityCleanupStyle Method................................................................... 377

SetAttachmentInfo Method (requires ACT! 4.0 or later).................................... 378

SetCalendarIncrements Method.................................................................... 380

SetDataToSynch Method (requires ACT! 4.0 or later)....................................... 381

SetDBMaintReminderInfo Method (requires ACT! 2000 or later)........................ 382

SetDefaultApplication Method....................................................................... 383

SetDefaultLocation Method........................................................................... 384

SetEmailInboxSettings Method..................................................................... 385

SetEmailNewMsgInfo Method....................................................................... 386

SetEmailSystem Method (requires ACT! 4.0 or later)....................................... 387

SetNameSettings Method............................................................................. 388

SetSchdActivityDefaults Method................................................................... 389

SetSchdAutoRollover Method........................................................................ 391

SetStyle Method.......................................................................................... 392

SetSynchSchedule Method (obsolete)........................................................... 393

SetSynchScheduleInfo Method (requires ACT! 4.0 or later).............................. 394

SetSynchSettings Method............................................................................ 395

SetSynchUpdateInfo Method (requires ACT! 4.0 or later).................................. 395

ShowContactParsingDialog Property (requires ACT! 2000 or later).................... 397

ShowCurrentMonthOnly Property.................................................................. 397

StartupDatabase Property............................................................................ 398

StartupMacro Property................................................................................. 399

TabNavigation Property................................................................................. 400

UseAct20Keys Property............................................................................... 401

UseDialer Property (not currently implemented).............................................. 402

UseLastDBonStartup Property...................................................................... 402

UseTypeahead Property (requires ACT! 4.0 or later)........................................ 403

WaitTime Property (requires ACT! 4.0 or later)................................................ 404

TaskListView object methods............................................................................. 406

AddNewActivity Method (obsolete)................................................................ 406

AddNewActivityEx Method (requires ACT! 4.0 or later)..................................... 406

GetGrid Method........................................................................................... 408

Views object property and methods..................................................................... 409

Application Method...................................................................................... 410

ClearError Method (requires ACT! 4.0 or later)................................................. 410

CloseAll Method.......................................................................................... 410

Count Property............................................................................................ 411

Create Method............................................................................................. 411

CreateBrowserView Method (requires ACT! 2000 version 5.0.2 or later)............. 412

CreateBrowserViewFromUrl Method (requires ACT! 2000 version 5.0.2 or later).. 413

CreateEx Method (requires ACT! 2000 or later)............................................... 413

FindExplorerView Method (requires ACT! 4.0 or later)...................................... 414

GetActive Method........................................................................................ 415

GetLastError Method.................................................................................... 416

GetView Method.......................................................................................... 416

GetViewEx Method (requires ACT! 2000 version 5.0.2 or later)......................... 417

Chapter 3       OLE Application Object Error Codes......................................................... 419

 


CHAPTER

Getting Started with the OLE Application Object

This section consists of three chapters that describe the ACT!TM OLE Application Object component of the ACT! Software Development Kit (SDK). The ACT! OLE Application Object provides third-party applications with both control and context interrogation of ACT! It is intended for use by both ACT! add-on product developers and enterprise product developers who need to tightly integrate ACT! into a larger end-user solution. A comprehensive set of methods and properties is included to control the application frame window, the current view, get or set view grid cells, set application preferences, and more.

Using the ACT! OLE Application Object, third-party application developers can minimize development time and ensure better compatibility in the future by employing the parts of the ACT! user interface exposed by the OLE Application Object to create new ACT! contacts, insert notes or activities, and manage database maintenance operations. Additionally, the OLE Application Object allows third-party applications to determine the current context of ACT! (current view, displayed contact or contact group, and so on) as controlled by the user, so that their functionality is more synchronous with the current ACT! UI views.

To use this section, you need to be familiar with and using the following:

·         ACT! for Windows, version 3.0.7 or later

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

·         Microsoft Visual Basic, version 4.0 or later, or Microsoft Visual C++ 4.0 or later

Microsoft Visual Basic for Applications can be used as an alternative development language to access data in Microsoft Access and Excel versions in Microsoft Office 95, and Microsoft Access, Excel and Word versions in Microsoft Office 97 through Office 2000.

Conventions used in this section

This section provides syntax conventions and terminology used in this section.

Syntax conventions

bold                                   Command names, function names, properties, methods, and other text you need to type are shown in bold.

ALL CAPITALS                File names and messages are shown in all CAPITAL letters.

Courier                              Example code is shown in a monospaced Courier font. Comments in the code are preceded by an apostrophe ('Comment). If a line of code does not fit on a single line of the page, the remaining code is indented on the next line. Code examples are not case sensitive.

italic                                  Parameters, return variables, data structure names, and text that represent the type of text to be entered rather than a literal series of characters are shown in italic.

[brackets]                          Optional items in syntax statements are enclosed in brackets ([ ]). For example, [password] indicates that a password can be used with the command, but is not required. In commands, include the information within the brackets without the brackets.

Parameter1|Parameter2     Parameters are separated by a vertical bar (|) to indicate a mandatory choice between two items. Only one of the items can be specified.

...                                       Items that you can repeat are indicated by an ellipsis (… ) For example, devicename [...] indicates that you can optionally specify more than one device, separating the device names with a space.

Terminology

ACT! database                   The term database, in relation to an ACT! database, refers to the set of tables and their associated indexes in an ACT! database.

Table                                  The term table refers to a specific table in an ACT! database.

Parameter types

The following table lists the data types that are referenced in this section. Parameter names follow Hungarian notation, beginning with a lowercase letter or letters that indicate the data type.

Parameter syntax

Data type

date

Date and time in Short Date style and Time style from Windows Regional Settings (DATE in Visual C++)

fParameter

Float (Single in Visual C++)

iParameter

Short integer

lParameter

Long integer

szString

String, terminated by a null character (BSTR in Visual C++)

True|False or
bParameter

Boolean

vParameter

Variant (VARIANT in Visual C++)

Special considerations

When creating an application using the ACT! OLE Application Object, keep the following in mind:

·         ACT! must have been started at least once after ACT! is installed to update the registry entries for the Application Object.

·         ACT! itself is executed when the object is instantiated but its UI can be hidden through an OLE Application Object method if desired. If you hide the ACT! user interface, the ACT! user interface might reappear after an exception condition (such as a confirmation message following the deletion of a record or a lookup failure).

·         If a client application starts ACT! or ACT! is running when the client application starts and the user selects Exit from the File menu, ACT! is hidden, but not closed. ACT! does not close until the client application releases control of ACT! by either closing ACT! or exiting.

·         If you need to use the OLE Application Object from more than one location in your program, define the Application object as a global variable. This enables you to access the Application Object from many locations in your program and reduces execution time by creating an Application object one time instead of once every time it is needed.

Using properties in Visual C++

For each property, the ACT! Application Object creates corresponding sets of Get and Set methods in an MFC wrapper class. Read-only properties, however, have only a Get method. If you are using Visual C++, check the C++ header file generated by Visual C++ (ACT.H) for the methods that correspond to properties documented in this manual.

Changing the focus

When you are developing a third-party application using the OLE Application Object, keep in mind that some functions within the Application Object set the focus to ACT! to keep ACT! as the foreground application. ACT! requires the focus to perform actions such as receiving Windows messages or using data stored in lists inside the application. Code needs to be added to a third-party application to bring it to the foreground as soon as it is done interacting with the OLE Application Object.

System requirements

Before you use the ACT! OLE Application Object, you should have the following applications already installed on your computer:

·         ACT! for Windows, version 3.0.7 or later. We recommend using the latest update. To receive an update, choose ACT! Update from the Help menu.

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

Development languages

Many programmers who work with the OLE Application Object work with Microsoft Visual Basic. Hence, most of the examples in the documentation of the application object are designed for the Visual Basic programmer. However, a type library is supplied and consequently, the integrated development environment (IDE) of Microsoft Visual C++ can be used to automatically generate prototypes for the object methods.

Using the Application Object with Visual C++

The following basic steps can help you get started using ACT! automation libraries using Microsoft Visual C++ 4.0 or later and Microsoft Foundation Class (MFC) library. To use the OLE Application Object in an application written using Visual C++, you first need to first create a wrapper class around the OLE objects supported by the OLE Application Object.

To create a wrapper class:

1        Create a new MFC project and enable OLE automation.

2       Open the class wizard and click Add Class.

3       Select the From Type Library option.

4       When prompted for the name of the type-library, choose ACT.TLB from the ACT! program files folder. The Confirm Classes dialog appears.

5       Click OK or select only those classes that you need, then click OK.

Visual C++ will automatically generate MFC wrapper classes for all methods and properties supported by the OLE Application Object.

For more information on how to use OLE automation in Visual C++, see Visual C++ online help.

Example C++ code

//This example lists the current contact's name, address and phone number

IActAppObj AppObj;

IAIViews ViewsObj;

IAIContactView ContactViewObj;

 

//Create a Dispatch pointer to the application object

AppObj.CreateDispatch("ACTOLE.APPOBJECT", pException);

 

//Set your own caption

AppObj.SetCaption("My Extended ACT!");

m_ListBox.ResetContent()

if (AppObj.IsDBOpen ())           //If a database is open

{

   //Attach the Views object

   LPDISPATCH viewsDispatch = AppObj.Views();

   ViewsObj.AttachDispatch(viewsDispatch, TRUE);

 

   //Attach the ContactView object

   LPDISPATCH CVDispatch = ViewsObj.Create(1,"CView");

       ContactViewObj.AttachDispatch(CVDispatch, TRUE);

 

   //List information about the current contact

   m_ListBox.AddString("Current Contact Information:");

   m_ListBox.AddString(ContactViewObj.GetField(CF_Name) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_Title) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_Company) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_Phone) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_Address1) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_City) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_State) + " "

       + ContactViewObj.GetField(CF_Zip) );

   m_ListBox.AddString(ContactViewObj.GetField(CF_Zip) );

 

   //Release all Dispatch pointers

       ContactViewObj.ReleaseDispatch();

   ViewsObj.ReleaseDispatch();

   AppObj.ReleaseDispatch();

}

Understanding key files

The following table lists key ACT! files used by the ACT! OLE Application Object. These files are stored in the ACT! program files folder.

File

Description

ACT.EXE

The ACT! Application Object is contained within the executable file for the ACT! application.

ACT.TLB

Type library that contains functions within the ACT! OLE Application Object. Methods contained in the type library need to be used directly by Visual C++ developers. In Visual Basic type library functions are handled automatically at run time.

ACTEVENT.OCX

OLE event notification control module, used by third-party applications for receiving event notification. An event is generated, for example, when the contact is changed in the Contact View.

ACTREG.EXE

The ACT! Windows registry update utility. This utility can be run manually if necessary to register ACT! OLE controls as a troubleshooting procedure.

The following table lists examples of properties and corresponding methods to use in Visual C++.

Property name

Type

C++ Method

ContactView.Active

Read Only

ContactView.GetActive()

Preferences.ExitPrompt

Read/Write

Preferences.GetExitPrompt()
(to get the value of the property)

Preferences.SetExitPrompt()
(to get the value of the property)

 


ACT! OLE Application Object model

The following diagram shows the relationships of objects in the ACT! OLE Application Object model.


 


What’s new

The ACT! OLE Application Object requires ACT! 3.0.7 or later. This section lists changes to the OLE Application Object for ACT! releases 4.0 or later.

Changes for ACT! 4.0

Modified methods

The following methods have been modified for ACT! 4.0:

Object

Modified Methods

Change

Application

Command

Many values for lCommandID parameter added

Grid

GetColumnCount
GetColumnID
GetCurrentRow
GetRowCount
GetRowNumber

Return value on failure changed from 100 to -1

Preferences

GetEmailNewMsgInfo

Return string changed to:
CreateHist\InitialText

 

GetSchdActivityDefaults

PopupFields returned item added

 

GetSynchSchedule

Return string changed to:
SynchDays\SynchTime...

 

SetEmailNewMsgInfo

The szInfo parameter changed to:
CreateHist\InitialText

 

SetSchdActivityDefaults

PopupFields parameter added

 

SetSynchSchedule

The szInfo parameter changed to:
SynchDays\SynchTime...

Added properties and methods

The following new properties and methods have been added for ACT! 4.0:

Object

New Properties

New Methods

Common properties and methods

 

ClearError

Application

 

AddUser
BackupDB
ClearError
GetCurrentUsername
GetUserPrivilege
GetVersion
ProcessFile
RestoreDB

ContactListView

 

AddNewContactEx

ContactView

 

AddNewActivityEx
AddNoteHistoryEx
AttachFile
GetTabCount
GetTabName
LookupFieldEx
NewContactDialog
SelectContactDlg

Grid

 

GetFilter
RefreshGrid
SelectRow
SetFilter

GroupView

 

AddNoteEx
AttachFile
GetTabCount
GetTabName
LookupFieldEx
SaveQuery

Preferences

AttachMsgToContact
AttachToMsgUsing
CalMinDurationForBanner
ContactSalutation
GenerateSynchReport
GetSynchScheduleInfo
NewActivitiesSeparate
PromptToPrintEnvelope
ReceivedSynchLocation
RemindToBackup
ReturnReceipt
UseTypeahead
WaitTime

ClearError
EnableSpeedLoader
GetAttachmentInfo
GetDataToSynch
GetEmailSystem
GetLastError
GetSynchUpdateInfo
SetAttachmentInfo
SetDataToSynch
SetEmailSystem
SetSynchScheduleInfo
SetSynchUpdateInfo

TaskListView

 

AddNewActivityEx

Views

 

ClearError
GetLastError

Changes for ACT! 2000

Added properties and methods

The following new properties and methods have been added for ACT! 2000:

Object

New Properties

New Methods

Common properties and methods

ViewState

CurrentFieldId
CurrentRecord
GetMode
HasRecordChanged
LookupKeyword

Application

ActVersion

RemoveOutlookActivities
UpdateOutlookActivities

ContactView

¾

CompleteSale
CreateLookup
CreateSalesForecast
DeleteContactFast
Sales
TriggerActivitySeries

EmailView

¾

GetOpenFolderMessageCount
Sort

GroupView

¾

AddNewSubGroup
ChangeToParentGroup
ChangeToSubGroup
Collapse
DeleteGroupFast
Expand
GetSubGroupCount
GroupType
IsExpanded

MailComposeView

¾

AddBccRecepient
AddCcRecepient

Preferences

ShowContactParsingDialog

GetDBMaintReminderInfo
SetDBMaintReminderInfo

Views

¾

CreateEx

Changes for ACT! 2000 version 5.0.2

Modified methods

The following methods have been modified for ACT! 5.0.2:

Object

Modified Methods

Change

ContactView

GetActiveGroup
GrtCurrentID

For versions of ACT! prior to ACT! 2000 version 5.0.2, these methods activate the Contact View upon return. For ACT! 2000 version 5.0.2 or later, these methods do not activate the Contact View.

Added methods

The following new methods have been added for ACT! 2000 version 5.0.2:

Object

New Methods

Views

CreateBrowserView
CreateBrowserViewFromUrl
GetViewEx

Modified documentation

The syntax for the following methods has been corrected in this document for ACT! 2000 version 5.0.2:

Object

Modified Methods
(documentation only)

Change

ContactView

AddRecepient
AddCcRecepient
AddBccRecepient
ClearRecepients

Syntax corrected. Note: Use the exact specified spelling.


CHAPTER

Using Application Object Properties and Methods

This chapter contains descriptions of the different properties and methods that apply to the various ACT! OLE Application objects. The chapter is divided into sections devoted to the following ACT! Application Object properties and methods:

·         Common properties and methods applying to more than one object

·         Application object properties and methods

·         CalendarView object methods

·         ContactListView object methods

·         ContactView object methods

·         EmailView object methods

·         ExplorerView object methods

·         Grid object methods

·         GroupView object methods

·         MailComposeView object methods

·         Preferences object properties and methods

·         TaskListView object methods

·         Views object property and methods

The descriptions for each object include one table of properties and one of methods (if applicable), followed by alphabetical descriptions of the combined properties and methods. The descriptions supply details and, in some cases, examples. Cross references are also given to other properties or methods in the same or another object. Where possible, the descriptions include error codes (in the heading GetLastError) that can be returned. Use the GetLastError method (described in “Common properties and methods”) to get the last error code for the object. Methods with a long integer or short integer return type return S_OK on success.

Common properties and methods

The following common properties and methods apply to the CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, and TaskListView objects.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Active

None

¾

Boolean

Read Only

Caption

[=szTitleBar]

String/BSTR

String/BSTR

Read/Write

Displayed

None

¾

Boolean

Read Only

Name

[=szName]

String/BSTR

String/BSTR

Read/Write

Type

None

¾

Long Integer

Read Only

ViewState

None

¾

Short Integer

Read/Write

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Activate

None

¾

Boolean

Application

None

¾

Object/LPDISPATCH

ClearError

None

¾

Void

Close

None

¾

Long Integer

CurrentFieldId

None

¾

Short Integer

CurrentRecord

None

¾

Long Integer

GetLastError

None

¾

Long Integer

GetMode

None

¾

Short Integer

HasRecordChanged

None

¾

Boolean

LookupKeyword

szKeyword,
lTables,
iLookupType,
szGroupName

String,
Long Integer,
Short Integer,
String

Void

Maximize

None

¾

Boolean

Minimize

None

¾

Boolean

Parent

None

¾

Object/LPDISPATCH

ReSize

iHeight,
iWidth

Short Integer,
Short Integer

Long Integer

Show

True|False

Boolean

Long Integer

Update

None

¾

Long Integer

Activate Method

Description    Activates the view by bringing it to the foreground. Returns True on success or False on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Activate

Return type   Boolean

GetLastError S_VW_NOT_FOUND

See also         Active, Displayed

Example         'This example can be put into a function that has been passed only

'the Views object – objViews. We assume in the main function that

'the GroupView object has already been created.

 

Dim objGrp1 as object

 

'Get the GroupView pointer.

Set objGrp1 = objViews.GetView(3)

 

'If the Group View is not visible, then make it visible.

If objGrp1.Displayed = False then

   objGrp1.Show True

End If

 

'If the GroupView is not the active view, then make it the active view.

If objGrp1.Active = False then

   objGrp1.Activate

End If

 

'Now any GroupView methods can be applied to manipulate the Group view.

 

'End the function

Set objGrp1 = Nothing

Active Property

Description    Returns True if the view is active or False if it is inactive or an error occurs. A view can be visible but inactive.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Active

Value type      Boolean, Read Only

GetLastError S_VW_NOT_FOUND

See also         Activate, Displayed, Show

Example         See Activate method.

Application Method

Description    Returns a dispatch pointer to the Application object containing the view. The returned pointer can be used to control the Application object.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Application

Return type   Object/LPDISPATCH

Caption Property

Description    Gets and sets the text in the title bar for the view.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Caption [= szTitleBar]

Parameters    szTitleBar               A string that specifies the text in the title bar for the view. Omit this optional parameter to get the text in the title bar.

Value type      String/BSTR, Read/Write

GetLastError S_VW_NOT_FOUND

Example         'This example gives the Task List window a new title bar.

Dim objApp as object

Dim objViews as object

Dim objTaskView as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

Set objViews = objApp.Views

Set objTaskView = objViews.Create (4,"TL")

 

'Change the text on the Task List title bar to "My Task View".

objTaskView.Caption = "My Task View"

 

'Close the Application object.

Set objApp = Nothing

ClearError Method (requires ACT! 4.0 or later)

Description    Clears the last error.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.ClearError

Return type   Void

See also         GetLastError

Close Method

Description    Closes the view. Returns S_ERROR on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Close

Return type   Long Integer

GetLastError S_VW_NOT_FOUND

CurrentFieldId Method (requires ACT! 2000 or later)

Description    Returns the field ID of the field containing the cursor. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Objects          ContactView, GroupView

Syntax            object.CurrentField

Return type   Short Integer

CurrentRecord Method (requires ACT! 2000 or later)

Description    Returns the current Contact or Group record number and position for the lookup.

Objects          ContactView, GroupView

Syntax            object.CurrentRecord

Return type   Long Integer

Example         'The following sample enumerates all the contacts and their record numbers.

 

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

objContactView.MoveFirst

'Move through all the contacts.

For i = 1 To objContactView.GetCount

   'Display the record number and the Contact name.

   lstVerify.AddItem "Contact # " & objContactView.CurrentRecord &

       " is : " & objContactView.GetField(CF_Name)

   objContactView.MoveNext

Next i

Example         'The following code enumerates the group and subgroup names and their

'record number positions in the current lookup.

'If a group tree is collapsed, it is expanded.

 

Set objViews = objApp.Views

Set objGrp = objViews.CreateEx(3, "GV",2)

objGrp.MoveFirst

'Go through all the groups.

For i = 0 To objGrp.GetCount - 1

   'If the group tree is not expanded, expand it.

   If objGrp.IsExpanded = False Then

       objGrp.Expand

   End If

   'List the record number and group name.

   List1.AddItem objGrp.CurrentRecord & " ---" & objGrp.GetField(GF_Name)

   objGrp.MoveNext

Next i

Displayed Property

Description    Returns True if the view is visible or False if the view is not visible.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Displayed

Value type      Boolean, Read Only

See also         Activate, Active, Show

GetLastError S_VW_NOT_FOUND

Example         See Activate method.

GetLastError Method

Description    Returns a long integer representing the last error code for the object. For a list of error codes, see the following chapter.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.GetLastError

Return type   Long Integer

GetMode Method (requires ACT! 2000 or later)

Description    Returns a short integer identifying the task that the Contact or Group form is currently used for. This method determines if the form is in data entry/browse mode, lookup by example mode, or replace fields mode. Operations on the view should be performed in data entry/browse mode.

Objects          ContactView, GroupView

Syntax            object.GetMode

Return type   Short Integer

Comments     The following values are returned by this method:

Value

Mode

 

Value

Mode

0

None (for example, when a dialog box is open)

 

3

Query

1

Data Entry/Browse

 

4

Replace Fields

2

Layout

 

 

 

Example         'The following example verifies that the Contact view is in data entry/

'browse mode before enumerating the contacts in the database.

 

Set objContactView = objViews.CreateEx(1, "CV", 1)

'If the mode is not 1 (not Data Entry/Browse)

If objContactView.GetMode <> 1 Then

   Select Case objContactView.GetMode

   Case 0

       MsgBox "A dialog is open in ACT!, please close it and try again"

   Case 2

       MsgBox "The Layout Editor is open in ACT!, please close it and try

          again"

   Case 3

       MsgBox "The Lookup by Example/Query is open in ACT!, please close it

          and try again"

   Case 4

       MsgBox "Replace Fields is open in ACT!, please close it and try again"

   End Select

Else

   'Now enumerate all the contacts in the database.

   objContactView.MoveFirst

   For i = 1 To objContactView.GetCount

       lstVerify.AddItem objContactView.GetField(CF_Name)

       objContactView.MoveNext

   Next i

End If

HasRecordChanged Method (requires ACT! 2000 or later)

Description    Returns True if the user has changed the current Contact or Group record (without saving the record) or False if the current record has not been changed.

Objects          ContactView, GroupView

Syntax            object.HasRecordChanged

Return type   Boolean

LookupKeyword Method (requires ACT! 2000 or later)

Description    Looks up the keyword in the specified tables and displays the Lookup Keyword dialog containing the results.

Object            ContactView, GroupView

Syntax            object.LookupKeyword (szKeyword, lTables, iLookupType, szGroupName)

Parameters    szKeyword             A string specifying the keyword.

lTables                   A long integer specifying the tables to be searched. This value is created by ORing together values that represent the tables.

Following is a list of the values for the lTables parameter:

Value

Table

 

Value

Table

1

Contact

 

8

Email

2

Activity

 

16

Groups

4

NoteHistory

 

32

Sales

 

iLookupType          A short integer specifying the lookup type.

Following is a list of the values for the iLookupType parameter:

Value

Type

 

Value

Type

0

All Records

 

2

Current Lookup

1

Current Record

 

3

Selected Group

 

szGroupName        If the lookup type is 3, specify a string containing the Unique ID of the selected group, otherwise specify a blank group name.

Return type   Void

Example         Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

 

'Lookup keyword "SDK" in the Contact view in the Contact, Activities and

'Notes/History fields for contacts belonging to a group with Unique ID GUID

objContactView.LookupKeyword "SDK", 1 Or 2 Or 4, 3, GUID

Maximize Method

Description    Maximizes the view. Returns True on success or False on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Maximize

Return type   Boolean

GetLastError S_VW_NOT_FOUND

See also         Minimize, Show

Minimize Method

Description    Minimizes the view. Returns True on success or False on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Minimize

Return type   Boolean

GetLastError S_VW_NOT_FOUND

See also         Maximize, Show

 

Name Property

Description    Sets or gets the name of the view.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Name[=szName]

                        szName                  A string that specifies the name of the view. Omit this optional parameter to get the name of the view.

Value type      String/BSTR, Read/Write

See also         Caption

Parent Method

Description    Returns a dispatch pointer to the Views object that contains this view. The returned pointer can be used to control the Views object.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Parent

Return type   Object/LPDISPATCH

ReSize Method

Description    Sets the size of the view. The current position (Top Left) of the view remains unchanged. Returns S_ERROR on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.ReSize(iHeight, iWidth)

Parameters    iHeight                   A short integer indicating the new height of the view.

iWidth                    A short integer indicating the new width of the view.

Return type   Long Integer

GetLastError S_VW_NOT_FOUND

See also         Maximize, Minimize, Show
GetSize in the Application object

Example         'This example resizes the view.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Resize the view.

objApp.ReSize 500, 800

 

'Close the Application object.

Set objApp = Nothing

Show Method

Description    Hides or displays the view.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Show(True|False)

Parameters    True|False              Specify True to display the frame or False to hide it.

Return type   Long Integer

GetLastError S_VW_NOT_FOUND

See also         Activate, Maximize, Minimize

Example         'This example displays the application window.

Dim objApp 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'If the application is not visible, then display it.

If objApp.IsVisible = False then

   objApp.Show (True)

End If

 

'Close the Application object.

Set objApp = Nothing

Type Property

Description    Returns the type of view. The property is set during creation of the view object using the Create method in the Views object.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Type

Value type      Long Integer, Read Only

Comments     This property returns one of the following values:

Value

State

 

Value

State

1

Contact view

 

5

Calendar view

2

Contact List view

 

6

E-mail inbox view

3

Group view

 

7

Explorer view

4

Task List view

 

 

 

Example         See the GetActive method in the Views object.

Update Method

Description    Redraws the view. Returns S_ERROR on failure.

Objects          CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.Update

Return type   Long Integer

GetLastError S_VW_NOT_FOUND

ViewState Property (requires ACT! 2000 or later)

Description    Returns the current view’s display state.

Object            CalendarView, ContactListView, ContactView, EmailView, ExplorerView, GroupView, MailComposeView, TaskListView

Syntax            object.ViewState

Value type      Short Integer, Read/Write

Comments     This property returns one of the following values:

Value

State

 

Value

State

1

Normal

 

3

Minimized

2

Maximized

 

4

Hidden

See also         CreateEx in Views object


Application object properties and methods

The Application object provides functions to externally control the ACT! application. The following properties and methods apply only to the Application object. See “Common properties and methods” in this section for properties and additional methods that apply to the ContactView object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

ActVersion

None

¾

String

Read Only

Caption

[= szTitleBar]

String/BSTR

String/BSTR

Read/Write

LastContactListModTime

None

¾

Long Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

AddUser

szUserName,
szPassword,
iPrivilege

String,
String,
Short Integer

Long Integer

BackupDB

szZipFileFullPath,
iItems,
iMode

String,
Short Integer,
Short Integer

Long Integer

ChangePassword

szUserName, szOldPassword, szNewPassword

String,
String,
String

Long Integer

ClearError

None

¾

Void

CloseDB

None

¾

Long Integer

Command

iCommandID

Short Integer

Long Integer

CompressDB

szDBName

String

Long Integer

GetActiveDB

None

¾

Object/LPDISPATCH

GetAppName

None

¾

String/BSTR

GetAppPath

None

¾

String/BSTR

GetCurrentUserName

None

¾

String/BSTR

GetLastError

None

¾

Long Integer

GetOpenDBName

None

¾

String/BSTR

GetPosition

lXPos,
lYPos

Long Integer, Long Integer

Long Integer

GetSize

lWidth, lHeight

Long Integer, Long Integer

Long Integer

GetUserId

None

¾

String/BSTR

GetUserPrivilege

None

¾

Long Integer

GetVersion

iFor

Short Integer

String/BSTR

Help

[szHelpFile, lContextID]

String,
Long Integer

Long Integer

IsDBOpen

None

¾

Boolean

IsVisible

None

¾

Boolean

Maximize

None

¾

Long Integer

Minimize

None

¾

Long Integer

OpenDB

szDBName

String

Object/LPDISPATCH

OpenFile

szDBName

String

Long Integer

Preferences

None

¾

Object/LPDISPATCH

ProcessFile

szFilename,
lReserved

String,
Long Integer

Long Integer

PurgeHistories

szDBName

String

Long Integer

PurgeNotes

szDBName

String

Long Integer

PurgeTransactions

szDBName

String

Long Integer

ReIndexDB

szDBName

String

Long Integer

RemoveOutlookActivities

iRemoveIn

Short Integer

Long Integer

ReSize

iHeight,
iWidth

Short Integer,
Short Integer

Long Integer

RestoreDB

szSourceZipFile,
szDestinationPath,
iMode

String,
String,
Short Integer

Long Integer

RunMacro

szMacroName

String

Long Integer

SaveCurrentLookup

szFilename

String

Long Integer

SendKey

lParam1,
lParam2,
lParam3

Long Integer, Long Integer, Long Integer

Long Integer

Show

True|False

Boolean

Long Integer

Update

None

¾

Long Integer

UpdateOutlookActivities

iUpdateDirection,
iDurationType

Short Integer,
Short Integer

Long Integer

Views

None

¾

Object/LPDISPATCH

ActVersion Property (requires ACT! 2000 or later)

Description    Returns a string that contains the version of the ACT! application. An example of a returned string is 5.0.0.175, where 5.0.0 is the version of ACT! (ACT! 2000) and 175 is the number of the build.

Object            Application

Syntax            object.ActVersion

Value type      String, Read Only

AddUser Method

Description    Adds a user with the specified password and security level to the open database, but does not verify that a My Record exists for the user. The database should not be open by the ACT! application or by another instance of OLE. The current user must have Administrator security level to add new users. Returns S_ERROR on failure.

Object            Application

Syntax     object.AddUser(szUserName, szPassword, iPrivilege)

Parameters    szUserName           A string representing the user name of the new user.

szPassword            A string representing the password for the new user.

iPrivilege               A short integer representing the privilege (security level) of the new user.

Following is a list of the values for the iPrivilege parameter:

Value

Security level

 

Value

Security level

0

Browse

 

2

Administrator

1

Standard

 

 

 

Return type   Long Integer

GetLastError S_NO_DB, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_CREATE_NEWUSER

See also         ChangePassword

Example         'This example adds the user "Tim Kelly".

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Add the user "Tim Kelly" with a password "User"

'with privilege to browse only.

objApp.AddUser "Tim Kelly", "User", 0

 

'Close the Application object.

Set objApp = Nothing

BackupDB Method (requires ACT! 4.0 or later)

Description    Backs up the current database to the specified zip file name and location. Returns S_ERROR on failure.

Object            Application

Syntax            object.BackupDB(szZipFileFullPath, iItems, iMode)

Parameters     szZipFileFullPath   A string representing the name and path of the zip file to contain the backed up database. The default file extension of .ZIP is used if an extension is not specified.

iItems                     A short integer that specifies the items to be included in the backup. This value is created by ORing together values that represent the items to be included in the backup.

                              The following table lists the values for items to be included in the backup:

Value

Item

 

Value

Item

1

Reports

 

4

Envelopes

2

Labels

 

8

Layouts

 

iMode                    Specify 167 to overwrite existing backup files located as specified in the szZipFileFullPath parameter. Specify 168 to not overwrite existing backup files and return without creating a backup if existing backup files are found in the specified location.

Return type   Long integer

See also         RestoreDB

Caption Property

Description    Gets and sets the text in the title bar for the view.

Object            Application

Syntax            object.Caption [= szTitleBar]

Parameters    szTitleBar               A string that specifies the text to appear in the title bar for the view. Omit this optional parameter to get the text that appears in the title bar.

Value type      String/BSTR, Read/Write

GetLastError S_MAIN_WND

Example         'This example gives the ACT! application a new caption.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Change the ACT! title bar from "ACT!" to "My ACT! Application"

App.Caption = "My ACT! Application"

 

'Close the Application object.

Set objApp = Nothing

ChangePassword Method

Description    Changes the password for the specified user name. Returns S_ERROR on failure.

Object            Application

Syntax     object.ChangePassword(szUserName, szOldPassword, szNewPassword)

Parameters    szUserName           A string representing an existing user name.

szOldPassword      A string representing the current password.

szNewPassword     A string representing the new password.

Return type   Long Integer

Comments     To be able to change the password, the current user must have Administrator privilege or szUserName must be the current user. If szOldPassword and the currently registered password for szUserName do not match, the method fails.

GetLastError S_NO_DB, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_NO_MATCH

See also         AddUser

Example         'This example changes the password for an existing user.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Change the password of user Tim Kelly from "User" to "Password".

objApp.ChangePassword "Tim Kelly", "User", "Password"

 

'Close the Application object.

Set objApp = Nothing

ClearError Method (requires ACT! 4.0 or later)

Description    Clears the last error.

Object            Application

Syntax            object.ClearError

Return type   Void

See also         GetLastError

CloseDB Method

Description    Closes the database and all open views in the application. Returns S_ERROR on failure.

Object            Application

Syntax            object.CloseDB

Return type   Long Integer

GetLastError S_ERROR

Command Method

Description    Executes the specified command. Returns S_ERROR on failure or if the specified command ID is not valid in the current context.

Object            Application

Syntax            object.Command(iCommandID)

Parameters    iCommandID          A short integer representing the command ID. For a list of values for this parameter, see the ACT! Command ID Reference appendix.

Return type   Long Integer

GetLastError S_NOMENU, S_INVALID_CMD

CompressDB Method

Description    Compresses the specified database. The database to be compressed should not be open. Use this method to maintain the database. Returns S_ERROR on failure.

Object            Application

Syntax            object.CompressDB(szDBName)

Parameters    szDBName       A string representing the name of the database that is to be compressed.

Return type   Long Integer

GetLastError S_NO_DB, S_INVALID_INPUT

Comments     It is possible that some database maintenance operations are occurring in the background after this method returns. Other database maintenance methods should not be invoked immediately after CompressDB.

See also         PurgeHistories, PurgeNotes, PurgeTransactions, ReIndexDB

Example         Note: Another database must be open before you can call these methods.

'This example reindexes and compresses the database "CONTACTS.DBF".

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open ACT5DEMO.DBF.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Reindex and compress the database Contacts.dbf, which is not open.

objApp.ReIndexDB C:\My Documents\ACT\Database\CONTACTS.dbf

objApp.CompressDB C:\My Documents\ACT\Database\CONTACTS.dbf

 

'Close the Application object.

Set objApp = Nothing

GetActiveDB Method (not currently implemented)

Description    Returns a dispatch pointer to the currently open database opened through OpenDB or OpenFile.

Object            Application

Syntax            object.GetActiveDB

Return type   Object/LPDISPATCH

See also         IsDBOpen, OpenDB, OpenFile

GetAppName Method

Description    Gets the name of the application. Returns NULL on failure.

Object            Application

Syntax            object.GetAppName

Return type   String/BSTR

See also         Caption, GetAppPath, GetOpenDBName

Example         'This example lists the application name and path in a list box.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'List the application name in a list box. If the ACT! folder

'has an ACT.EXE this should list "ACT"

List1.AddItem objApp.GetAppName

 

'If ACT.EXE is in the C:\PROGRAM FILES\ACT folder,

'then "C:\PROGRAM FILES\ACT" should be listed.

List1.AddItem objApp.GetAppPath

 

'Close the Application object.

Set objApp = Nothing

GetAppPath Method

Description    Gets the path from where the ACT! application is currently executing. Returns NULL on failure.

Object            Application

Syntax            object.GetAppPath

Return type   String/BSTR

GetLastError S_ERROR

See also         GetAppName

Example         See GetAppName.

GetCurrentUserName Method (requires ACT! 4.0 or later)

Description    Returns a string containing the user name of the user currently logged on to the currently open database in the ACT! application.

Object            Application

Syntax            object.GetCurrentUserName

Return type   String/BSTR

GetLastError Method

Description    Returns a long integer representing the last error code for the object. For a list of error codes, see the following chapter.

Object            Application

Syntax            object.GetLastError

Return type   Long Integer

GetOpenDBName Method

Description    Gets the file name of the active database. Returns NULL on failure.

Object            Application

Syntax            object.GetOpenDBName

Return type   String/BSTR

GetLastError S_CON_DOC

See also         GetActiveDB

Example         'This example gets the file name of the active database.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'If a database is already open.

If objApp.IsDBOpen = True then

   'If the open database is not ACT5DEMO.DBF, then open it.

   If objApp.GetOpenDBName <>

("C:\My Documents\ACT\Database\ACT5demo.dbf") then

       objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

   End If

End If

Set objDatabase = Nothing

 

'Close the Application object.

Set objApp = Nothing

GetPosition Method

Description    Retrieves the position of the application’s frame window.

Object            Application

Syntax            object.GetPosition(lXPos, lYPos)

Parameters    lXPos                     A long integer (pointer in Visual C++) representing the X coordinate of the window’s top-left position.

lYPos                     A long integer (pointer in Visual C++) representing the Y coordinate of the window’s top-left position.

Return type   Long Integer

See also         GetSize, ReSize

Example         'This example gets the location of the ACT! application.

Dim objApp as object

Dim lx as long

Dim ly as long

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Get the location (Y and Y coordinates of the top left corner)

'of the ACT! application.

objApp.GetPosition lx, ly

List1.AddItem "ACT Position = " & lx & " , " & ly

 

'Close the Application object

Set objApp = Nothing

GetSize Method

Description    Gets the size of the application frame window.

Object            Application

Syntax            object.GetSize(lWidth, lHeight)

Parameters    lWidth           A long integer (pointer to long integer in Visual C++) representing the width of the main window.

lHeight           A long integer (pointer to long integer in Visual C++) representing the height of the main window.

Return type   Long Integer

See also         GetPosition, ReSize

Example     'This example gets the size of the application frame window.

Dim objApp as object

Dim lHeight as long

Dim lWidth as long

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Get the dimensions of the window.

objApp.GetSize lWidth, lHeight

List1.AddItem "Width = " & lWidth

List1.AddItem "Height = " & lHeight

 

'Close the Application object.

Set objApp = Nothing

GetUserId Method

Description    Gets the Unique ID of the user currently logged on to ACT!

Object            Application

Syntax            object.GetUserId

Return type   String/BSTR

GetLastError S_NO_OPENDB, S_NO_SECURITY, S_NO_USER

Example         'This example gets the Unique ID of the current user.

Dim objApp as object

Dim sUserId as string

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Gets the Unique ID of the user currently logged on to ACT!

sUserId = objApp.GetUserId

 

'Close the Application object.

Set objApp = Nothing

GetUserPrivilege Method

Description    Gets the security level of the current user of the open database. Returns S_ERROR on failure.

Object            Application

Syntax     object.GetUserPrivilege

Return type   Long Integer

Comments     The following table lists the values that are returned by this method.

Value

Setting

 

Value

Setting

0

Browse

 

2

Administrator

1

Standard

 

 

 

GetLastError S_NO_SECURITY, S_NO_USER

GetVersion Method (requires ACT! 4.0 or later)

Description    Gets the version of the open ACT! database or the ACT! application. To get the version of an ACT! database it must be open. Returns NULL on error.

Object            Application

Syntax            object.GetVersion(iFor)

Parameters    iFor             A short integer representing the version to get. Specify 0 to get the version of the open ACT! database or 1 to get the version of the ACT! application.

Return type   String/BSTR

Help Method

Description    Displays the help window for the help topic specified by the context ID.

Object            Application

Syntax            object.Help [(szHelpFile, lContextID)]

Parameters    szHelpFile              A string representing the name of the help file.

lContextID             A long integer representing the context ID of the help topic to be displayed.

Return type   Long Integer

Comments     If both szHelpFile and lContextID are specified, the specified help topic is displayed; otherwise, the ACT! help system is started.

IsDBOpen Method

Description    Returns True if the database is open or False if it is not open.

Object            Application

Syntax            object.IsDBOpen

Return type   Boolean

See also         OpenDB

Example         See GetOpenDBName.

IsVisible Method

Description    Returns the display state of the application. Returns True if the main frame window of the application is visible or False if it is not visible.

Object            Application

Syntax            object.IsVisible

Return type   Boolean

GetLastError S_MAIN_WND

See also         GetSize, Maximize, Minimize, ReSize, Show

Example         See Show.

LastContactListModTime Property

Description    Returns the time at which the current lookup was last modified.

Object            Application

Syntax            object.LastContactListModTime

Value type      Long Integer, Read Only

Maximize Method

Description    Maximizes the application frame window. Returns S_ERROR on failure.

Object            Application

Syntax            object.Maximize

Return type   Long Integer

GetLastError S_MAIN_WND

See also         GetSize, Minimize, ReSize, Show

Minimize Method

Description    Minimizes the application frame window. Returns S_ERROR on failure.

Object            Application

Syntax            object.Minimize

Return type   Long Integer

GetLastError S_MAIN_WND

See also         GetSize, Maximize, ReSize, Show

OpenDB Method

Description    Closes the active database, opens the specified database.

Object            Application

Syntax            object.OpenDB(szDBName)

Parameters    szDBName             A string representing the name of the database to be opened.

Return type   Object/LPDISPATCH

GetLastError S_INVALID_INPUT

Comments     Normally, invoking OpenDB displays the Login dialog box. Invoking this method (or the OpenFile method) before the user responds to the Login dialog box causes unpredictable results.

See also         GetActiveDB, IsDBOpen, OpenFile

Example         'This example opens the ACT5DEMO database.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Close the Application object.

Set objApp = Nothing

OpenFile Method

Description    Opens the specified database file. Opening a database file closes the currently active database and makes the new database the active database.

Object            Application

Syntax            object.OpenFile(szDBName)

Parameters    szDBName             A string representing the name of the database file to be opened.

Return type   Long Integer

GetLastError S_INVALID_INPUT

Comments     Normally, invoking OpenFile displays the Login dialog box. Invoking this method (or the OpenDB method) before the user responds to the Login dialog box causes unpredictable results.

See also         GetActiveDB, IsDBOpen, OpenDB

Example         'This example opens the ACT5DEMO.DBF database file.

 

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

objApp.Maximize

 

'Close the Application object.

Set objApp = Nothing

Preferences Method

Description    Returns a dispatch pointer to the Preferences object. The returned dispatch pointer can be used to manipulate user preferences within the ACT! application. This method fails if there is no open database. Returns NULL on error.

Object            Application

Syntax            object.Preferences

Return type   Object/LPDISPATCH

GetLastError S_NO_OPENDB, S_MEM_ERROR

ProcessFile Method

Description    Launches the specified file from the NetLinks folder. Returns S_ERROR on failure.

Object            Application

Syntax            object.ProcessFile(szFilename, lReserved)

Parameters    szFilename             A string representing the file name of a file in the NetLinks folder.

lReserved               A long integer value reserved for future use.

Return type   Long Integer

GetLastError S_ERROR

PurgeHistories Method

Description    Purges histories of all contacts and against all activities for the specified database. The database should not be the currently open database. Use this method to maintain the database. Returns S_ERROR on failure.

Object            Application

Syntax            object.PurgeHistories(szDBName)

Parameters    szDBName             A string representing the name of the database where histories are to be purged.

Return type   Long Integer

GetLastError S_NO_DB, S_INVALID_INPUT

Comments     It is possible that some database maintenance operations are occurring in the background after this method returns. Other database maintenance methods should not be invoked immediately after PurgeHistories.

See also         PurgeNotes, PurgeTransactions

Example         'This example purges all history records for the CONTACTS database.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open ACT5DEMO.DBF.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Purge all history records for the CONTACTS database.

objApp.PurgeHistories "C:\My Documents\ACT\Database\CONTACTS.dbf"

 

'Close the Application object.

Set objApp = Nothing

PurgeNotes Method

Description    Purges notes for all contacts and against all activities for the specified database. The database should not be the currently open database. Use this method to maintain the database. Returns S_ERROR on failure.

Object            Application

Syntax            object.PurgeNotes(szDBName)

Parameters    szDBName             A string representing the name of the database where notes are to be purged.

Return type   Long Integer

GetLastError S_NO_DB, S_INVALID_INPUT

Comments     It is possible that some database maintenance operations are occurring in the background after this method returns. Other database maintenance methods should not be invoked immediately after PurgeNotes.

See also         PurgeHistories, PurgeTransactions

Example         'This example purges all notes in the CONTACTS database.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open ACT5DEMO.DBF.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Purge all notes for the CONTACTS database.

objApp.PurgeNotes C:\My Documents\ACT\Database\CONTACTS.dbf

 

'Close the Application object.

Set objApp = Nothing

PurgeTransactions Method

Description    Purges all transactions for all contacts and against all activities for the specified database. The database should not be the currently open database. Use this method to maintain the database. Returns S_ERROR on failure.

Object            Application

Syntax            object.PurgeTransactions(szDBName)

Parameters    szDBName             A string representing the name of the database where histories are to be purged.

Return type   Long Integer

GetLastError S_NO_DB, S_INVALID_INPUT

Comments     It is possible that some database maintenance operations are occurring in the background after this method returns. Other database maintenance methods should not be invoked immediately after PurgeTransactions.

See also         PurgeHistories, PurgeNotes

Example         'This example purges all transactions for the CONTACTS database.

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open ACT5DEMO.DBF.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Purge all transactions for the CONTACTS database.

objApp.PurgeTransactions C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Close the Application object.

Set objApp = Nothing

ReIndexDB Method

Description    Reconstructs the index for the specified database. The database should not be the currently open database. Use this method to maintain the database. Returns S_ERROR on failure.

Object            Application

Syntax            object.ReIndexDB(szDBName)

Parameters    szDBName             A string representing the name of the database to be reindexed. The database should not be the current database

Return type   Long Integer

GetLastError S_NO_DB, S_INVALID_INPUT

Comments     It is possible that some database maintenance operations are occurring in the background after this method returns. Other database maintenance methods should not be invoked immediately after ReIndexDB.

See also         CompressDB

Example         See CompressDB.

RemoveOutlookActivities Method (requires ACT! 2000 or later)

Description    Removes Outlook activities from ACT!, or ACT! Activities from Outlook, or both depending on the parameters used. This method applies only when Outlook is installed. Returns 0 if successful or returns an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            Application

Syntax            object.RemoveOutlookActivities (iRemoveIn)

Parameters    iRemoveIn              A short integer representing the activities to remove.

                              The following table lists the value for each activity type:

Value

Activities

1

Removes Outlook activities from ACT!

2

Removes ACT! activities from Outlook

3

Removes Outlook activities from ACT! and removes ACT! activities from Outlook

Return type   Long Integer

See also         UpdateOutlookActivities

ReSize Method

Description    Sets the size of the application main frame window. The current (top-left) position of the frame is unchanged. Returns S_ERROR on failure.

Object            Application

Syntax            object.ReSize(iHeight, iWidth)

Parameters    iHeight                   A short integer representing the new height of the frame.

iWidth                    A short integer representing the new width of the frame.

Return type   Long Integer

GetLastError S_MAIN_WND

See also         GetPosition, GetSize, Maximize, Minimize, Show

Example         'This example resizes the application window.

 

Dim objApp as object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Resize the application window.

objApp.ReSize 500, 800

 

'Close the Application object.

Set objApp = Nothing

RestoreDB Method (requires ACT! 4.0 or later)

Description    Restores the database from the specified zip file name and location. Returns S_ERROR on failure.

Object            Application

Syntax            object.BackupDB(szSourceZipFile, szDestinationPath, iMode)

Parameters     szSourceZipFile     A string representing the source name and path of the zip file containing the backed up database to be restored.

szDestinationPath  A string representing the destination name and path for the database to be restored.

iMode                    Specify 167 to overwrite any existing database located as specified in the szDestinationPath parameter. Specify 168 to not overwrite an existing database and return without restoring the backup if an existing database is found in the specified location.

Return type   Long Integer

See also         BackupDB

RunMacro Method

Description    Runs the macro stored in the specified file at recorded speed. Returns S_ERROR on failure.

Object            Application

Syntax            object.RunMacro(szMacroName)

Parameters    szMacroName        A string representing the full path and file name of the file containing the macro.

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_MACRO_ERROR

Example         'This example runs the MYMACRO macro.

Dim objApp 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Run the macro MYMACRO. (Macro files have extension .MPR and

'are stored in C:\PROGRAM FILES\ACT\macro by default.)

objApp.RunMacro "C:\PROGRAM FILES\ACT\macro\mymacro.mpr"

 

'Close the Application object.

Set objApp = Nothing

SaveCurrentLookup Method

Description    Saves the current lookup in the specified file. If a file with the same name exists, it is overwritten. Returns S_ERROR on failure.

Object            Application

Syntax            object.SaveCurrentLookup(szFilename)

Parameters    szFilename             A string representing the name of the file where the lookup should be saved.

Return type   Long Integer

GetLastError S_CON_DOC, S_CON_LIST, S_ERROR, S_FILE_OPEN

SendKey Method

Description    Sends a message to the application. Similar to Windows SendMessage. Currently only WM_CHAR messages are sent.

Object            Application

Syntax            object.SendKey(lParam1, lParam2, lParam3)

Parameters    lParam1                 A long integer specifying additional data to be sent.

lParam2                 A long integer specifying additional data to be sent. (Currently ignored.)

lParam3                 A long integer specifying additional data to be sent. (Currently ignored.)

Return type   Long Integer

Comments     The returned value depends on the message being sent.

Show Method

Description    Hides or displays the application frame window. Returns S_ERROR on failure.

Object            Application

Syntax            object.Show(True|False)

Parameters    True|False              Specify True to display the frame or False to hide it.

Return type   Long Integer

GetLastError S_ERROR, S_MAIL_WND

Comments     After the application frame window is hidden, any action that causes a dialog box to be displayed might cause the frame window to become visible again.

See also         Maximize, Minimize

Example         'This example displays the application window.

 

Dim objApp 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'If the application is not visible, then display it.

If objApp.IsVisible = False then

   objApp.Show (True)

End If

 

'Close the Application object.

Set objApp = Nothing

Update Method

Description    Redraws the application frame window. Returns S_ERROR on failure.

Object            Application

Syntax            object.Update

Return type   Long Integer

UpdateOutlookActivities Method (requires ACT! 2000 or later)

Description    Updates ACT! with Outlook activities, or Outlook with ACT! activities, or both depending on the parameters used. This method applies only when Outlook is installed. Returns 0 if successful or returns an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            Application

Syntax            object.UpdateOutlookActivities (iUpdateDirection, iDurationType)

Parameters    iUpdateDirection   A short integer representing the direction of the update.

                              The following table lists the values for this parameter:

Value

Direction

1

From ACT! to Outlook

2

From Outlook to ACT!

3

Both

 

iDurationType       A short integer representing the duration type of the update.

                              The following table lists the values for this parameter:

Value

Duration

1

All days

2

Today

3

Today and in the future

4

Over the next 30 days

Return type   Long Integer

See also         RemoveOutlookActivities

Example         'The following line updates ACT! with activities in Outlook for today.

 

ret = objApp.UpdateOutlookActivities(1, 2)

Views Method

Description    Returns a dispatch pointer to the view collection object. The returned dispatch pointer can be used to create new views and access and manipulate any existing views in the application. This method fails if there is no open database. Returns NULL on error.

Object            Application

Syntax            object.Views

Return type   Object/LPDISPATCH

GetLastError S_NO_OPENDB, S_MEM_ERROR

Example         'This example creates a Views object.

 

Dim objApp as object

Dim objViews 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Close the Application object.

Set objApp = Nothing


CalendarView object methods

The CalendarView object provides an interface to use the Calendar view in the ACT! application. The following properties and methods apply only to the CalendarView object. See “Common properties and methods” for properties and additional methods that apply to the CalendarView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

GetActiveMonth

None

¾

Short Integer

GetCalendarMode

None

¾

Short Integer

SetActiveMonth

iMonth

Short Integer

Long Integer

SetCalendarMode

iMode

Short Integer

Long Integer

The following sample code demonstrates how to use the CalendarView object:

Dim objApp as object

Dim objViews as object

Dim objCal as object

Dim i as long

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the Calendar object.

Set objCal = objViews.Create(5, "MyCal")

 

'If the Calendar Active month is not April, then set it to April.

If objCal.GetActiveMonth <> 4 Then

   objCal.SetActiveMonth (4)

End If

 

'If the Calendar is not weekly, then set it to weekly.

If objCal.GetCalendarMode <> 301 Then

   objCal.SetCalendarMode (301)

End If

 

objViews.CloseAll

Set objCal = Nothing

Set objViews = Nothing

 

'Close the Application object.

Set objApp = Nothing

GetActiveMonth Method

Description    Returns the month between 1 and 12 indicating the active in the calendar view. Returns 0 (zero) on error.

Object            CalendarView

Syntax            object.GetActiveMonth

Return type   Short Integer

GetLastError S_NO_CALVW

See also         SetActiveMonth

GetCalendarMode Method

Description    Returns the mode in which the calendar is being displayed.

Object            CalendarView

Syntax            object.GetCalendarMode

Return type   Short Integer

Comments     The following table lists the values that are returned by this method.

Value

Mode

 

Value

Mode

300

Monthly calendar

 

302

Daily calendar

301

Weekly calendar

 

0

Error

GetLastError S_NO_CALVW

See also         SetCalendarMode

SetActiveMonth Method

Description    Sets the specified month to be the active month in the calendar view. Returns S_ERROR on an invalid month.

Object            CalendarView

Syntax            object.SetActiveMonth(iMonth)

Parameters    iMonth                   A short integer between 1 and 12 representing the active month.

Return type   Long Integer

GetLastError S_NO_CALVW, S_INVALID_INPUT

See also         GetActiveMonth

SetCalendarMode Method

Description    Sets the mode in which the calendar is displayed in the calendar view and activates the view.

Object            CalendarView

Syntax            object.SetCalendarMode(iMode)

Parameters    iMode                    A short integer representing the mode for displaying the calendar:

Value

Mode

 

Value

Mode

300

Monthly

 

302

Daily

301

Weekly

 

 

 

                                                      If iMode is not one of the above values, the mode is set to Monthly.

Return type   Long Integer

GetLastError S_NO_CALVW

See also         GetCalendarMode


ContactListView object methods

The ContactListView object provides an interface to use the Contact List view in the ACT! application. The following methods apply only to the ContactListView object. See “Common properties and methods” for properties and additional methods that apply to the ContactListView object.

Method

Method name

Parameter(s)

Parameter type(s)

Return type

AddNewContactEx

None

¾

String/BSTR

GetGrid

None

¾

Object/LPDISPATCH

AddNewContact Method (obsolete)

Use AddNewContactEx instead of this method.

AddNewContactEx Method (requires ACT! 4.0 or later)

Description    Adds a new contact to the database. Use SetField in the Grid object to set the fields in the newly created row. Returns the Unique ID of the new contact. Use GetRowNumber in the Grid object to find the row number of the new contact.

Object            ContactListView

Syntax            object.AddNewContactEx

Return type   String/BSTR

Comments     The new contact appears as the first visible row in the Contact List view. The Contact List view is activated after a call to this method.

See also         AddNewContact
GetField, GetRowNumber, SetField, in Grid object

Example         'This example adds a new contact in the Contact List view.

 

Dim objCtListView As Object

Dim objCtView As Object

Dim objCtListGrid As Object

Dim RN As Integer

Dim objV As Object

Dim uid As String

Dim objApp As Object

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create the Views object.

Set objViews = objApp.Views

'Create the Contact List view.

Set objCtListView = objViews.Create(2, "CL")

'Create the Grid object.

Set objCtListGrid = objCtListView.GetGrid

 

'Add a new Contact record and get the Unique ID.

uid = objCtListView.AddNewContactEx

'Get the row number.

RN = objCtListGrid.GetRowNumber(uid)

 

'Populate the fields.

objCtListGrid.SetField CF_Name, RN, "Carl Bowman"

RN = objCtListGrid.GetRowNumber(uid)

objCtListGrid.SetField CF_Company, RN, "Cordoba Coffee Shops"

RN = objCtListGrid.GetRowNumber(uid)

objCtListGrid.SetField CF_Phone, RN, "415-555-1212"

RN = objCtListGrid.GetRowNumber(uid)

objCtListGrid.SetField CF_Title, RN, "Engineer"

Set objCtListGrid = Nothing

 

'Close the Contact List view.

objCtListView.Close

Set objCtListView = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetGrid Method

Description    Returns a dispatch pointer to a grid object for the Contact List view. The returned dispatch pointer can be used to manipulate the grid object. Returns NULL on error.

Object            ContactListView

Syntax            object.GetGrid

Return type   Object/LPDISPATCH

GetLastError S_ERROR

Example         'This example returns a dispatch pointer.

 

Dim objApp as object

Dim objViews as object

Dim objContactListView as object

Dim objContactListViewGrid 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Initialize the Views object.

Set objViews = objApp.Views

 

List1.AddItem objApp.GetLastError

Set objCtListView = objViews.Create(2, "CL")

 

'Get the Grid Object in the Contact List.

Set objCtListGrid = objCtListView.GetGrid

 

'List the contact name and company for all the contacts in the Contact List.

For i = 0 To objCtListGrid.GetRowCount - 1

   List1.AddItem objCtListGrid.GetField(CF_Name, i) & "  ,  " &

       objCtListGrid.GetField(CF_Company, i)

Next i

 

Set objCtListGrid = Nothing

objCtListView.Close

Set objCtListView = Nothing

Set objViews = Nothing

Set objApp = Nothing


ContactView object methods

The ContactView object provides an interface to use the Contact view in the ACT! application. The following methods apply only to the ContactView object. See “Common properties and methods” for properties and additional methods that apply to the ContactView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Activities

None

¾

Object/LPDISPATCH

AddContactToGroup

szGroupID

String

Long Integer

AddNewActivityEx

szContactID…,
szDate
Time,
iType,
iTimeless,
szRegarding,
lDuration

String,
String,
Short Integer,
Short Integer,
String,
Long Integer

String/BSTR

AddNewContact

None

¾

Long Integer

AddNoteHistoryEx

iType

Short Integer

String/BSTR

AttachFile

szFilename

String

Long Integer

BOL

None

¾

Boolean

CompleteSale

szSaleID,
iStatus,
dateClosed,
szReason,
lUnits,
fUnitPrice,
fAmount

String
Short Integer
Date
String
Long Integer
Float (Single)
Float (Single)

Long Integer

CreateLookup

szContact…

String

Long Integer

CreateSalesForecast

szContactID,
szProductID,
szType,
szCompetitor,
lUnits,
fUnitPrice,
fAmount,
dateClose,
lProb

String,
String,
String,
String ,
Long Integer,
Float (Single),
Float (Single),
Date,
Long Integer

String

Delete

None

¾

Long Integer

DeleteContactFast

None

¾

Long Integer

EOL

None

¾

Boolean

GetActiveGroup

None

¾

String/BSTR

GetActiveGroupName

None

¾

String/BSTR

GetActiveTab

None

¾

String/BSTR

GetCount

None

¾

Short Integer

GetCurrentID

None

¾

String/BSTR

GetField

lFieldID

Long Integer

String/BSTR

GetTabCount

None

¾

Short Integer

GetTabName

iTabNo

Short Integer

String/BSTR

Goto

szContactID

String

Long Integer

GroupMembership

None

¾

Object/LPDISPATCH

LookupAll

None

¾

Long Integer

LookupFieldEx

lFieldID,
szFieldValue,
iType

Long Integer,
String,
Short Integer

Long Integer

LookupMyRecord

None

¾

Long Integer

LookupPrevious

None

¾

Long Integer

MoveFirst

None

¾

Long Integer

MoveLast

None

¾

Long Integer

MoveNext

None

¾

Long Integer

Moveprevious

None

¾

Long Integer

NewContactDialog

None

¾

Long Integer

NotesHistory

None

¾

Object/LPDISPATCH

RunQuery

szQueryFile

String

Long Integer

Sales

None

¾

Object/LPDISPATCH

SaveQuery

szQueryFile

String

Long Integer

SelectContactDlg

szText

String

String/BSTR

SetActiveGroup

szGroupID

String

Long Integer

SetActiveGroupName

szGroupName

String

Long Integer

SetActiveTab

szTabName

String

Long Integer

SetField

lFieldID,
szFieldValue

Long Integer,
String

Long Integer

TriggerActivitySeries

iLookupType,
SeriesDate,
szActivitySeriesName

Short Integer,
Date,
String

Long Integer

Activities Method

Description    Returns a dispatch pointer to a Grid object for the Activities tab. The Activities tab must be the active tab before calling this method. Returns NULL on error.

Object            ContactView

Syntax            object.Activities

Return type   Object/LPDISPATCH

GetLastError S_MEM_ERROR, S_NO_DALLIST_VIEW, S_UNKNOWN

See also         GetActiveTab, NotesHistory, SetActiveTab

AddContactToGroup Method

Description    Adds the current contact to the specified group. If the function is successful, the specified group appears in the Groups tab of the Contact view. If the contact is currently a member of the specified group or the Unique ID is invalid, this method fails. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.AddContactToGroup(szGroupID)

Parameters    szGroupID             A string representing the Unique ID of the group.

Return type   Long Integer

GetLastError S_ADD_CONTACT, S_DUPLICATE_GRP, S_INVALID_INPUT, S_UNKNOWN

See also         AddMembersToGroup in GroupView object

Example         'This example adds the current contact to the group with the ID GroupID.

Dim objApp as object

Dim objViews as object

Dim objContact 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = objApp.Views

'Create the ContactView object.

Set objContact = objViews.Create(1, "MyContact")

 

'Set Groups to be the active tab.

objContact.SetActiveTab "Groups"

 

'Add the current contact in the Contact view to the group

'with the Unique ID GroupID.

objCView.AddContactToGroup GroupId

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

AddNewActivity Method (obsolete)

Use AddNewActivityEx instead of this method.

AddNewActivityEx Method (requires ACT! 4.0 or later)

Description    Adds a new activity for the specified contacts using Activity defaults set in Preferences. Returns the Unique ID of the new activity on success and NULL on failure. If any ID in szContactID is invalid, this method returns S_OK, but GetLastError returns S_INVALID_INPUT. Use GetFilter and SetFilter in the Grid object before using this method.

Object            ContactView

Syntax            object.AddNewActivityEx(szContactID…, szDateTime, iType, iTimeless, szRegarding, lDuration)

Parameters    szContactID           A string representing the Unique ID(s) of contacts with which the new activity will be associated. If a NULL value is specified for this required parameter, the new activity will be associated with the default of the current database user.

Note: Specify multiple Unique IDs as a continuous string of 12‑character values, with no delimiters between the Unique ID values.

szDateTime            A string representing the starting date and time of the activity, formatted in Windows Regional Settings Short Date style and Time style.

iType                      A short integer representing the type of activity to be added.

The following table lists the values for this parameter.

Value

Setting

 

Value

Setting

0

Call

 

2

To-do

1

Meeting

 

 

 

                        iTimeless                A short integer representing the timeless status of the activity to be added.

The following table lists the values for this parameter.

Value

Setting

0

Not timeless

1

Timeless

                        szRegarding           A string representing the description of the activity.

lDuration               A long integer representing the duration in minutes of the activity.

Return type   String/BSTR

GetLastError S_ACTIVITY_INIT_FAIL, S_CON_DOC, S_HELPER_EEDIT_FAIL, S_INVALID_INPUT, S_PROPS_NOT_FOUND, S_UNKNOWN

Example         'This example adds a high priority to-do to the current contact, dated '10/20/98, at 10:00 AM, duration 45 minutes, regarding "A Meeting".

 

'Initialize the application object.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Create the Views object.

Set objViews = objApp.Views

 

'Create the Contacts view.

Set objCView = objViews.Create(1, "CV")

 

'Get the Unique ID of the current contact.

sContact = objCView.GetCurrentID

'Set Activities to be the Active Tab

objCView.SetActiveTab "Activities"

 

'Create the Grid object.

Set objActiv = objCView.Activities

'Get Activities filter values.

objActiv.GetFilter x, y, z

j = 1 or 2 or 4 or 8 or 16 or 32 or 64 or 128

objActiv.SetFilter j, 1, " "

 

'Add an activity. Its Unique ID is returned in uid as a string.

uid = objCView.AddNewActivityEx(sContact, "10/20/98 10:00AM",

   activitytype_meeting,0,"A meeting", "45")

'Get the row number.

RN = objActiv.GetRowNumber(uid)

 

'Set other parameters in the activity.

objActiv.SetField AF_Priority, RN, activitypriority_medium

 

'Reset the Activities filter values.

objActiv.SetFilter x, y, z

 

Set objActiv = Nothing

Set objCView = Nothing

AddNewContact Method

Description    Displays a new contact with all fields blank. Use SetField to populate the contact fields.

Object            ContactView

Syntax            object.AddNewContact

Return type   Long Integer

GetLastError S_UNKNOWN

See also         Delete, GetField, SetField

Example         'This example displays the Contact view and adds a contact.

 

Dim objApp as object

Dim objViews as object

Dim objContact 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the ContactView object –This brings up the Contact view.

Set objContact = objViews.Create(1, "MyContact")

 

'Add a contact with all blank fields. Set the Contact, Company,

'address and Phone fields.

objContact.AddNewContact

objCView.SetField CF_Name, "My Contact"

objCView.SetField CF_Company, "My Company"

objCView.SetField CF_Address1, "My Address1"

objCView.SetField CF_City, "City"

objCView.SetField CF_State, "State"

objCView.SetField CF_Phone, "415-555-1212"

objCView.SetField CVF_EmailAddress, "MyContact@MyCompany.com"

 

'Close the Contact view.

objContact.Close

objViews.CloseAll

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

AddNoteHistory Method (obsolete)

Use AddNoteHistoryEx instead of this method.

AddNoteHistoryEx Method (requires ACT! 4.0 or later)

Description    Adds a Notes/History record for the current contact. Use SetField in the Grid object to set other fields in the newly created row. The Notes/History tab must be the active tab before calling this method. Returns the Unique ID of the new Notes/History record on success and NULL on failure. Use GetFilter and SetFilter in the Grid object before using this method.

Note: This method extends the functionality of the AddNoteHistory method.

Object            ContactView

Syntax            object.AddNoteHistoryEx(iType)

Parameters    iType                      A short integer indicating whether a note or the type of history to be added. To add a note, iType must be 100.

                                                      To add a history, iType must be one of the following values:

Value

Setting

 

Value

Setting

0

Call attempted

 

7

Meeting not held

1

Call completed

 

8

To-do done

2

Call received

 

9

To-do not done

6

Meeting held

 

17

Left message

Return type   String/BSTR

GetLastError S_CON_DOC, S_INVALID_INPUT, S_MEM_ERROR, S_NO_DALLIST_VIEW, S_NO_RECORD, S_RECORD_HISTORY, S_UNKNOWN

See also         AddNoteHistory
GetField, SetField in Grid object
AddNote in GroupView object

Example         'This example adds a note to the current contact.

'Initialize the application object.

 

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Create the Views object.

Set objViews = objApp.Views

 

'Create the Contact view.

Set objCView = objViews.Create(1, "CV")

 

'Get the Unique ID of the Current contact.

sContact = objCView.GetCurrentID

 

'Set Notes/History to be the active tab.

objCView.SetActiveTab "Notes/History"

 

Create the Grid object.

Set objNH = objCView.NotesHistory

 

'Add a note. The Unique ID is returned in uid as a string.

uid = objCView.AddNoteHistoryEx(100)

 

'Get the row number.

RN = objNH.GetRowNumber(uid)

objNH.SetField NHF_Text, RN, " Test Note"

objNH.SetField NHF_UserTime, RN, "10/28/98 8:00AM"

 

Set objNH = Nothing

Set objCView = Nothing

AttachFile Method (requires ACT! 4.0 or later)

Description    Adds the specified file as an attachment to the Notes/History tab of the Contacts view. Returns S_OK on success and S_ERROR on failure.

Object            ContactView

Syntax            object.AttachFile(szFilename)

Parameters    szFilename             A string representing the complete path and the file name of the file to add as an attachment.

Return type   Long Integer

GetLastError S_CON_DOC, S_ERROR, S_NOT_FOUND, S_UNKNOWN

See also         AttachFile in GroupView object

BOL Method

Description    Returns True if the current contact is at the beginning of the lookup or False if it is not at the beginning of the lookup or if an error occurs.

Object            ContactView

Syntax            object.BOL

Return type   Boolean

GetLastError S_CON_DOC, S_UNKNOWN

See also         EOL, Goto, MoveFirst, MoveLast, MoveNext, Moveprevious

CompleteSale Method (requires ACT! 2000 or later)

Description    Completes the specified sale. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            ContactView

Syntax            object.CompleteSale (szSaleID, iStatus, dateClosed, szReason, lUnits, fUnitPrice, fAmount)

Parameters    szSaleID                A string representing the Unique ID of the sales opportunity record for which to complete the sale.

iStatus                    A short integer representing the status of the sale.

                              The following table lists the values for this parameter:

Value

Status

 

Value

Status

0

Open

 

2

Lost

1

Won

 

 

 

 

dateClosed             The date the sale closed, formatted in Windows Regional Settings Short Date style.

szReason                A string representing the reason the sale was won or lost.

lUnits                     A long integer representing the number of units sold.

fUnitPrice              A float (single) representing the price at which each unit was sold.

fAmount                 A float (single) representing the total amount of the sale.

Return type   Long Integer

See also         CreateSalesForecast, Sales

Example         'The following example code closes a particular sale.

 

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

objContactView.Goto ContactId

objContactView.SetActiveTab "Sales/Opportunities"

Set objSales = objContactView.Sales

   'Get the Sale Unique ID for a particular row number.

   SaleId = objSales.GetUniqueID(RowNumber)

 

'If the sales is not closed, then complete it.

If objSales.GetField(SLF_Status, i) = "Sales Opportunity" Then

'Won the Sale, new close date 8/6/99, new unit price 10.85,

'quantity 6000.

   objContactView.CompleteSale SaleId, 1, "8/06/99",

       "We lowered the price to beat the competition", 6000, 10.85,

       (10.85 * 6000)

End If

CreateLookup Method (requires ACT! 2000 or later)

Description    Creates a lookup of the list of Contact Unique IDs concatenated without delimiters. Returns 0 if successful or returns an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            ContactView

Syntax            object.CreateLookup (szContactID…)

Parameters    szContactID           A string representing the Unique IDs of the contacts.

Note: Specify multiple Unique IDs as a continuous string of
12-character values, with no delimiters between the Unique ID values.

Return type   Long Integer

Example         'The following sample creates a lookup of 3 contacts whose Unique IDs

'you have.

 

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, 2)

 

'Moving first.

objContactView.MoveFirst

'Concatenate the Unique IDs of the contacts to include in the lookup.

ContactId = ContactId1 & ContactId2 & ContactId3

'Create the lookup of the 3 contacts.

objContactView.CreateLookup ContactId

CreateSalesForecast Method (requires ACT! 2000 or later)

Description    Creates a new sales opportunity and returns its Unique ID.

Object            ContactView

Syntax            object.CreateSalesForecast (szContactID, szProductID, szType, szCompetitor, lUnits, fUnitPrice, fAmount, dateClose, lProb)

Parameters    szContactID           A string representing the Unique ID of the contact to which to associate the sales opportunity.

szProductID           A string representing the Unique ID of the product.

szType                    A string representing the Unique ID of the product type to which to associate the sales record.

szCompetitor          A string representing the name of the main competitor for the sale.

lUnits                     A long integer representing the number of units expected to be sold.

fUnitPrice              A float (single) representing the price at which each unit is expected to be sold.

fAmount                 A float (single) representing the expected total amount of the sale.

dateClose               The date the sale is expected to close.

lProb                     A long integer representing the probability of winning the sale in a percentage value between 0 and 100.

Return type   String

See also         CompleteSale, Sales

Example         'The following code creates a new Sales Opportunity for 6000 pcs of

'ProductA of "TypeA"@$11 each and with main competitor BigCorp, Inc.

 

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

objContactView.Goto ContactId

objContactView.SetActiveTab "Sales/Opportunities"

Set objSales = objContactView.Sales

'New Sales Opportunity for ProductA of TypeA , 6000 units at $11 each,

'close date 10/22/99 and 65% probability.

sid = objContactView.CreateSalesForecast(ContactId, "ProductA",

   "TypeA", "BigCorp, Inc.", 6000, 11#, (11# * 1000), "10/22/99", 65)

'Get the row number.

RN = objSales.GetRowNumber(sid)

'Set the "SalesStage"

objSales.SetField SLF_SalesStage, RN, "New Opportunity"

RN = objSales.GetRowNumber(sid)

'Set the start date for the sale.

objSales.SetField SLF_SaleStartDate, RN, "4/4/99"

Delete Method

Description    Deletes the selected contact and all details about the contact including activities, notes and histories. Displays a dialog box to confirm the deletion.

Object            ContactView

Syntax            object.Delete

Return type   Long Integer

GetLastError S_UNKNOWN

See also         AddNewContact

DeleteContactFast Method (requires ACT! 2000 or later)

Description    Deletes the current contact without invoking the confirmation dialog boxes. Returns 0 if the contact is successfully deleted or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            ContactView

Syntax            object.DeleteContactFast

Return type   Long Integer

See also         DeleteGroupFast in GroupView object

Example         'The following sample selects a contact and then deletes it.

 

Set objContactView = objViews.Create(1, "CL")

objContactView.MoveFirst

'Select the contact you want to delete.

ContactId = objContactView.SelectContactDlg("Select Contact you would like

   to delete")

objContactView.Goto ContactId

objContactView.GetField (CF_Name)

'Create a confirmation message, since ACT! will now not provide one.

ret = MsgBox("Are you sure you want to delete " & ContactName & " ?", vbYesNo Or vbExclamation)

'If the user selected Yes, delete the contact.

If ret = vbYes Then

   objContactView.DeleteContactFast

End If

EOL Method

Description    Returns True if the current contact is at the end of the lookup or False if it is not at the end of the lookup or if an error occurs.

Object            ContactView

Syntax            object.EOL

Return type   Boolean

GetLastError S_CON_DOC, S_UNKNOWN

See also         BOL, Goto, MoveFirst, MoveLast, MoveNext, Moveprevious

GetActiveGroup Method

Description    Gets the Unique ID of the active group. If the active group is <No Group>, an empty string or blank is returned.

Note: If you are using a version of ACT! prior to ACT! 2000 version 5.0.2, this method activates the Contact View upon return. For ACT! 2000 version 5.0.2 or later, this method does not activate the Contact View. Use the Activate method to activate the Contact View if necessary.

Object            ContactView

Syntax            object.GetActiveGroup

Return type   String/BSTR

GetLastError S_CON_DOC, S_UNKNOWN

See also         GetActiveGroupName, SetActiveGroup, SetActiveGroupName

Example         Dim objApp as object

Dim objViews as object

Dim objContact as object

Dim sGUID as string

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = objApp.Views

 

'Create the ContactView object.

Set objContact = objViews.Create(1, "MyContact")

 

'If the active group is not Activities, make it the active group.

If objContact.GetActiveGroup <> sGUID Then

 objContact.SetActiveGroup sGUID

End If

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetActiveGroupName Method

Description    Gets the name of the active group. One group is designated as the active group in ACT! All new contacts are associated with the active group by default. Calling this method before adding a contact provides information about the group that the new contact will be associated with. Returns NULL on error.

Object            ContactView

Syntax            object.GetActiveGroupName

Return type   String/BSTR

GetLastError S_CON_DOC, S_ERROR, S_UNKNOWN

See also         GetActiveGroup, SetActiveGroup, SetActiveGroupName

Example         Dim objApp as object

Dim objViews as object

Dim objContact as object

Dim sGUID as string

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = objApp.Views

 

'Create the ContactView object.

Set objContact = objViews.Create(1, "MyContact")

 

'If the active group is not "Nuts and Things"

'then set the active group to "Nuts and Things".

If objContact.GetActiveGroupName <> "Nuts and Things" Then

   objContact.SetActiveGroupName ("Nuts and Things")

End If

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetActiveTab Method

Description    Gets the text that appears on the currently active tab. Returns NULL on error.

Object            ContactView

Syntax            object.GetActiveTab

Return type   String/BSTR

GetLastError S_CON_DOC, S_NO_TAB_CONTAINER, S_UNKNOWN

See also         Activities, GroupMembership, NotesHistory, SetActiveTab

Example         'This example makes the Activities tab active.

Dim objApp as object

Dim objViews as object

Dim objContact 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = objApp.Views

 

'Create the ContactView object.

Set objContact = objViews.Create(1, "MyContact")

 

'If the active tab is not Activities, set the active tab to Activities.

If objContact.GetActiveTab <> "Activities" Then

   objContact.SetActiveTab "Activities"

End If

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetCount Method

Description    Gets the total number of contacts in the current lookup. Returns –1 on error.

Object            ContactView

Syntax            object.GetCount

Return type   Short Integer

GetLastError S_COUNT, S_UNKNOWN

GetCurrentID Method

Description    Returns the Unique ID of the current contact in the lookup. Returns NULL on error.

Note: If you are using a version of ACT! prior to ACT! 2000 version 5.0.2, this method activates the Contact View upon return. For ACT! 2000 version 5.0.2 or later, this method does not activate the Contact View. Use the Activate method to activate the Contact View if necessary.

Object            ContactView

Syntax            object.GetCurrentID

Return type   String/BSTR

GetLastError S_ERROR, S_UNKNOWN

Example         'This example lists all contacts and their Unique IDs.

 

Dim objApp as object

Dim objViews as object

Dim objContact as object

Dim i as integer

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the ContactView object. This brings up the Contact view.

Set objContact = objViews.Create(1, "MyContact")

objContact.MoveFirst              'Move to the first contact.

 

'Go through all the contacts and list their Unique IDs.

For i = 1 To objContact.GetCount         'Get the number of contacts.

   List1.AddItem objContact.GetCurrentID 'List contact Unique ID.

   List1.AddItem objContact.GetField (CF_Name)

   objContact.MoveNext

Next i

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetField Method

Description    Gets the value of the specified field in the current record. Returns NULL on failure.

Object            ContactView

Syntax            object.GetField(lFieldID)

Parameters    lFieldID                 A long integer representing the name of the field whose value is to be retrieved. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   String/BSTR

GetLastError S_CON_DOC, S_UNKNOWN

See also         SetField

Example         See GetCurrentID.

GetTabCount Method (requires ACT! 4.0 or later)

Description    Returns the number of tabs in the Contact view, including tabs added using the Adding Extensible Views and Tabs to ACT! component of the ACT! SDK. Returns –1 on error.

Object            ContactView

Syntax            object.GetTabCount

Return type   Short Integer

GetLastError S_CON_DOC, S_NO_TAB_CONTAINER, S_UNKNOWN

See also         GetTabName

Example         'This example gets the number of tabs and the names of the tabs

'in the Contact view.

 

Dim objApp as object

Dim objViews as object

Dim objContact 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = objApp.Views

 

'Create the ContactView object.

Set objContact = objViews.Create(1, "MyContact")

 

'List all the Tabs in the ContactView.

For i = 0 To objContact.GetTabCount - 1

   List1.AddItem "TabName " & objContact.GetTabName(i)

Next i

 

'Close the Contact view.

objContact.Close

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetTabName Method (requires ACT! 4.0 or later)

Description    Returns a string containing the name of the specified tab in the Contact view. Returns NULL on error.

Object            ContactView

Syntax            object.GetTabName(iTabNo)

Parameters    iTabNo                   A short integer that specifies the tab index number, in a range between 0 and one less than the value returned by GetTabCount.

Return type   String/BSTR

GetLastError S_CON_DOC, S_NO_TAB_CONTAINER, S_UNKNOWN

See also         GetTabCount

Example:        See GetTabCount.

Goto Method

Description    Makes the specified contact the current contact and displays it. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.Goto(szContactID)

Parameters    szContactID           A string representing the Contact ID.

Return type   Long Integer

GetLastError S_CON_DOC, S_UNKNOWN

See also         MoveFirst, MoveLast, MoveNext, Moveprevious

GroupMembership Method

Description    Returns a dispatch pointer to a grid object for the Groups tab in the Contacts view. The Groups tab must be the active tab before calling this method. Returns NULL on error.

Object            ContactView

Syntax            object.GroupMembership

Return type   Object/LPDISPATCH

GetLastError S_CON_DOC, S_MEM_ERROR, S_NO_DALLIST_VIEW, S_UNKNOWN

See also         Activities, GetActiveTab, NotesHistory, SetActiveTab

Example         Set objCView = objViews.Create(1, "CV")

 

objCView.SetActiveTab "Groups"

'Create the Grid object for the grid on the Groups tab in the Contacts view.

Set objGM = objCView.GroupMembership

'List all the groups a contact belongs to.

For i = 0 To objGM .GetRowCount - 1

   List1.AddItem objGM .GetField(GF_Name, i)

Next i

 

Set objGM = Nothing

Set objCView = Nothing

LookupAll Method

Description    Creates and displays a lookup consisting of all contact records. The result of this lookup becomes the current lookup and the previous lookup is saved.

Object            ContactView

Syntax            object.LookupAll

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         LookupField, LookupMyRecord, LookupPrevious, RunQuery

LookupField Method (obsolete)

Use LookupFieldEx instead of this method.

LookupFieldEx Method (requires ACT! 4.0 or later)

Description    Creates and displays a contact lookup based on a specified field value. The result becomes the current lookup and the previous lookup is saved. Returns S_ERROR on failure.

Note: This method extends the functionality of LookupField in ACT! 4.0 or later.

Object            ContactView

Syntax            object.LookupFieldEx(lFieldID, szFieldValue, iType)

Parameters    lFieldID                 A long integer representing the field ID of the field to be used in the lookup. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szFieldValue          A string representing the field value to match. Only contacts with the specified field value in the specified field are retrieved.

iType                      A short integer indicating the action on the current lookup

The following table lists the values for this parameter.

Value

Setting

0

Add to the current lookup

1

Narrow the current lookup

n

Specify any other number to replace the current lookup

Return type   Long Integer

GetLastError S_CON_DOC, S_INVALID_ID, S_UNKNOWN

See also         LookupAll, LookupField, LookupMyRecord, LookupPrevious, RunQuery

Example         'Example of doing a lookup from the ContactView object.

 

Dim objContactView As Object

Dim ContactId As String

Dim k As Integer

Dim objApp As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

 

'Lookup all contacts with "Cordoba" in the company field.

objContactView.LookupFieldEx CF_Company, "Cordoba", 2

 

'Narrow the lookup to all contacts with a name starting with "Carl".

objContactView.LookupFieldEx CF_Name, "Carl", 1

If objContactView.GetCount = 0 then

   MsgBox "No names starting with Carl found"

Endif

Set objContactView = Nothing

Set objViews = Nothing

Set objApp = Nothing

LookupMyRecord Method

Description    Creates and displays a lookup consisting only of the current user’s My Record. The result of this lookup becomes the current lookup and the previous lookup is saved.

Object            ContactView

Syntax            object.LookupMyRecord

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         LookupAll, LookupField, LookupPrevious, RunQuery

LookupPrevious Method

Description    Returns the most recent lookup, which replaces the current lookup.

Object            ContactView

Syntax            object.LookupPrevious

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         LookupAll, LookupField, LookupMyRecord, RunQuery

MoveFirst Method

Description    Displays the first record in the current lookup.

Object            ContactView

Syntax            object.MoveFirst

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         BOL, EOL, MoveLast, MoveNext, Moveprevious

MoveLast Method

Description    Displays the last record in the current lookup.

Object            ContactView

Syntax            object.MoveLast

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         BOL, EOL, MoveFirst, MoveNext, Moveprevious

MoveNext Method

Description    Displays the next record in the current lookup. Returns S_NONE if the next record does not exist.

Object            ContactView

Syntax            object.MoveNext

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         BOL, EOL, MoveFirst, MoveLast, Moveprevious

Example         'This example displays the next record in the lookup.

objContact.MoveNext

If objContact.EOL then

   MsgBox "End of Contact List"

End If

Moveprevious Method

Description    Displays the previous record in the current lookup. Returns S_NONE if the previous record does not exist.

Object            ContactView

Syntax            object.Moveprevious

Return type   Long Integer

GetLastError S_UNKNOWN, S_VW_NOT_FOUND

See also         BOL, EOL, MoveFirst, MoveLast, MoveNext

NewContactDialog Method (requires ACT! 4.0 or later)

Description    Opens the Add Contact dialog box enabling the user to enter the information for a new contact. Returns S_OK if the user clicked OK after typing the contact name and any other contact information and S_ERROR if the user clicked Cancel.

Object            ContactView

Syntax            object.NewContactDialog

Return type   Long Integer

GetLastError S_UNKNOWN

Comments     This method will not return until the user closes the dialog box by clicking OK or Cancel.

See also         AddNewContact

NotesHistory Method

Description    Returns a dispatch pointer to a Grid object for the Notes/History tab in the Contacts view. Returns NULL on error.

Object            ContactView

Syntax            object.NotesHistory

Return type   Object/LPDISPATCH

GetLastError S_CON_DOC, S_MEM_ERROR, S_NO_DALLIST_VIEW, S_UNKNOWN

See also         Activities, GetActiveTab, SetActiveTab

RunQuery Method

Description    Loads and runs the specified saved query and creates and displays a lookup based on the query. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.RunQuery(szQueryFile)

Parameters    szQueryFile           A string representing the complete path and file name of the file containing the query to be executed.

Return type   Long Integer

GetLastError S_CON_DOC, S_NOT_FOUND, S_UNKNOWN

See also         LookupAll, LookupField, LookupMyRecord, LookupPrevious

Example     'This example loads and runs MyQuery.qry.

 

Dim objApp as object

Dim objViews as object

Dim objContact 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the ContactView object. This brings up the Contact view.

Set objContact = objViews.Create(1, "MyContact")

 

'Run MyQuery. Contacts that meet the criteria are in the current lookup.

objGrp.RunQuery "C:\PROGRAM FILES\ACT\QUERY\MYQUERY.QRY"

 

'Close the Contact view.

objContact.Close

objViews.CloseAll

Set objContact = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

Sales Method (requires ACT! 2000 or later)

Description    Returns a dispatch pointer to the grid object for the Sales tab.

Object            ContactView

Syntax            object.Sales

Return type   Object/LPDISPATCH

See also         CompleteSale, CreateSalesForecast

Example         'The following sample lists Sales records for a specified contact.

Set objViews = objApp.Views

Set objContactView = objViews.CreateEx(1, "CV", 2)

'Select the Sales/Opportunities tab.

objContactView.SetActiveTab "Sales/Opportunities"

'Go to the contact for which to list the Sales records.

objContactView.Goto ContactId

'Set the Sales Grid object.

Set objSales = objContactView.Sales

List1.AddItem objSales.GetRowCount & " Sales for this Contact"

For i = 0 To objSales.GetRowCount - 1

   List1.AddItem objSales.GetField(SLF_Status, i) & "  " &

       objSales.GetField(SLVF_ProductName, i) & "  " &

       objSales.GetField(SLVF_TypeName, i) & "  " &

       objSales.GetField(SLF_SaleDate, i)

   List1.AddItem objSales.GetField(SLF_Units, i) & "  " &

       objSales.GetField(SLF_UnitPrice, i) & "  " &

       objSales.GetField(SLF_Amount, i) & " " &

       objSales.GetField(SLVF_Competitors, i)

Next i

SaveQuery Method

Description    Saves the current query in the specified .QRY file. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.SaveQuery(szQueryFile)

Parameters    szQueryFile           A string representing the complete path and file name of the file where the query will be saved. Query files must have a .QRY extension.

Return type   Long Integer

GetLastError S_CON_DOC, S_UNKNOWN

SelectContactDlg Method (requires ACT! 4.0 or later)

Description    Opens the Associate with Contact dialog box with the specified text in the Item: field to enable the user to select a contact to associate with the item. Returns the Unique ID of the selected contact if the user clicked OK or NULL if the user clicked Cancel.

Object            ContactView

Syntax            object.SelectContactDlg(szText)

Parameters    szText                     A string representing the text to be displayed in the Item: field of the Associate with Contact dialog box.

Return type   String/BSTR

GetLastError S_UNKNOWN

Comments     This method will not return until the user closes the dialog box by clicking OK or Cancel.

Example         Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CV")

ContactId = objContactView.SelectContactDlg("Select a Contact")

objContactView.Goto ContactId

 

'Now you can do whatever you want with this contact,

'Add a note, activity, etc.

 

Set objContactView = Nothing

Set objViews = Nothing

SetActiveGroup Method

Description    Makes the group with the specified Unique ID active.

Object            ContactView

Syntax            object.SetActiveGroup(szGroupID)

Parameters    szGroupID             A string representing the Unique ID of the group to be made active.

Note: To make <No Group> the active group, specify an empty string.

Return type   Long Integer

GetLastError S_CON_DOC, S_UNKNOWN

See also         GetActiveGroup, GetActiveGroupName, SetActiveGroupName

Example         See GetActiveGroup.

SetActiveGroupName Method (requires ACT! 4.0 or later)

Description    Makes the group (specified by group name) active. One group is designated as the active group in ACT! All new contacts are associated with the active group by default. Calling this method before adding a contact ensures that the new contact is associated with the specified group.

Object            ContactView

Syntax            object.SetActiveGroupName(szGroupName)

Parameters    szGroupName        A string representing the name of the group to be made active.

Return type   Long Integer

GetLastError S_CON_DOC, S_UNKNOWN

See also         GetActiveGroup, GetActiveGroupName, SetActiveGroup

Example         See GetActiveGroupName.

SetActiveTab Method

Description    Makes the specified tab active. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.SetActiveTab(szTabName)

Parameters    szTabName            A string representing the name of the tab to be made active.

Return type   Long Integer

GetLastError S_CON_DOC, S_INVALID_TAB, S_NO_TAB_CONTAINER, S_UNKNOWN

See also         Activities, GetActiveTab, NotesHistory

SetField Method

Description    Sets the value of the specified field in the current record. Returns S_ERROR on failure.

Object            ContactView

Syntax            object.SetField(lFieldID, szFieldValue)

Parameters    lFieldID                 A long integer representing the field ID of the field. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szFieldValue          A string representing the value to set in the specified field.

Return type   Long Integer

GetLastError S_CON_DOC, S_INVALID_INPUT, S_UNKNOWN

See also         GetField

Example         See AddNewContact.

TriggerActivitySeries Method (requires ACT! 2000 or later)

Description    Runs the specified activity series. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            ContactView

Syntax            object.TriggerActivitySeries (iLookupType, SeriesDate, szActivitySeriesName)

Parameters    iLookupType                A short integer representing the lookup type.

                                    The following table lists the values for this parameter:

Value

Type

 

Value

Type

0

All records

 

2

Current Lookup

1

Current record

 

3

Selected Group

 

SeriesDate                   A date representing the start date or due date for the activity series, formatted in Windows Regional Settings Short Date style.

szActivitySeriesName   A string specifying the file name and path for the activity series. Activity series files are stored in \ACT\Macro. The file extension must be .SER.

Return type   Long Integer

Example         'This example code schedules the "Test.ser" series with the current lookup

'and a start date of 9/11/99.

 

Set objViews = objApp.Views

Set objContactView = objViews.Create(1, "CL")

ret = objContactView.TriggerActivitySeries(1, "9/11/99",

   "c:\Program Files\ACT\Macro\Test.ser")

Set objContactView = Nothing


EmailView object methods

The EmailView object provides an interface to use the E-mail Inbox view in the ACT! application. The following methods apply only to the EmailView object. See “Common properties and methods” for properties and additional methods that apply to the EmailView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

GetActiveInbox

None

¾

String/BSTR

GetInboxCount

None

¾

Short Integer

GetInboxName

iInbox

Short Integer

String/BSTR

GetOpenFolderMessageCount

None

¾

Short Integer

MsgComposeView

None

¾

Object/LPDISPATCH

OpenInbox

szName

String

Long Integer

SetActiveInbox

szName

String

Long Integer

Sort

iColumn,
True|False

Short Integer,
Boolean

Long Integer

GetActiveInbox Method

Description    Returns the name of the currently active inbox in the E-mail view. The name returned is exactly as it appears on the view. Returns NULL on error.

Object            EmailView

Syntax            object.GetActiveInbox

Return type   String/BSTR

GetLastError S_GET_SELECTION_FAIL, S_NO_EMAIL

See also         SetActiveInbox

GetInboxCount Method

Description    Returns the number of inboxes set up in the E-mail view.

Object            EmailView

Syntax            object.GetInboxCount

Return type   Short Integer

GetLastError -1

GetInboxName Method

Description    Returns the name of the specified inbox. The name returned is exactly as it appears on the view. Returns NULL on an invalid index.

Object            EmailView

Syntax            object.GetInboxName(iInbox)

Parameters    iInbox                    A short integer representing the index.

Return type   String/BSTR

GetLastError S_NO_EMAIL

Comments     The inbox is specified through the index. Index begins at 0 (zero) to retrieve the name of the first inbox. Index can never exceed the count returned by GetInboxCount.

Example         'This example lists all the mail inbox names.

 

Dim objEmail as object

Dim objApp as object

Dim objViews as object

Dim i as integer

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objViews = App.Views

Set objEmail = objViews.Create(6, "Email")

 

'List all mail inboxes.

For i = 0 To objEmail.GetInboxCount - 1

   List1.AddItem objEmail.GetInboxName(i)

Next i

 

objEmail.Close

Set objEmail = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetOpenFolderMessageCount Method (requires ACT! 2000 or later)

Description    Gets the number of messages in the currently-open e-mail inbox.

Object            EmailView

Syntax           object.GetOpenFolderMessageCount

Return type   Short Integer

Example         Set objInbox = objViews.Create(6, "Email")

objInbox.OpenInbox ("cc:Mail")

 

'Get the number of messages in the cc:Mail inbox.

lstVerify.AddItem objInbox.GetOpenFolderMessageCount

MsgComposeView Method

Description    Returns a dispatch pointer to the E-mail compose view. Returns NULL on failure.

Object            EmailView

Syntax            object.MsgComposeView

Return type   Object/LPDISPATCH

Example         'This example returns a dispatch pointer to the E-mail compose view.

 

Dim objEmail as object

Dim objApp as object

Dim objViews as object

Dim objEComp 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:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objViews = App.Views

Set objEmail = objViews.Create(6, "Email")

 

'Create the MsgComposeView.

Set objEComp = objEmail.MsgComposeView

 

'Close the Mail Compose view before closing E-mail Compose view.

objEComp.Close

 

objEmail.Close

Set objEmail = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

OpenInbox Method

Description    Opens the specified inbox in the E-mail view. Returns S_ERROR on failure.

Object            EmailView

Syntax            object.OpenInbox(szName)

Parameters    szName                  A string representing the name of the inbox in the E-mail view.

Return type   Long Integer

GetLastError S_FOLDER_OPEN_FAIL

See also         GetInboxName

SetActiveInbox Method

Description    Sets the specified inbox as the currently active inbox in the E-mail view. Returns S_ERROR on failure.

Object            EmailView

Syntax            object.SetActiveInbox(szName)

Parameters    szName                  A string representing the name of the inbox in the E-mail view.

Return type   Long Integer

GetLastError S_NO_EMAIL

See also         GetActiveInbox

Example         'This example sets cc:Mail to be the active inbox.

 

Dim objEmail as object

Dim objApp as object

Dim objViews 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:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objViews = App.Views

Set objEmail = objViews.Create(6, "Email")

 

'If the Active Mailbox is not cc:Mail, then set cc:Mail to be active.

If objEmail.GetActiveInbox <> "cc:Mail" Then

   objEmail.SetActiveInbox ("cc:Mail")

End If

 

objEmail.Close

Set objEmail = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

Sort Method (requires ACT! 2000 or later)

Description    Sorts the e-mail inbox by the specified column in the order specified. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            EmailView

Syntax            object.Sort (iColumn, True|False)

Parameters    iColumn                 A short integer representing the column on which to sort the e-mail inbox. For example, specify 3 to sort by the From column, 4 for the Date column, or 5 for the Subject column.

True|False             Specify True to sort the specified column in descending order or False to sort it in ascending order.

Return type   Long Integer


ExplorerView object methods

The ExplorerView object provides an interface to use an Explorer view that was added to the ACT! application using the Adding Extensible Views and Tabs to ACT! component of the ACT! SDK. The following methods apply only to the ExplorerView object. See “Common properties and methods” for properties and additional methods that apply to the ExplorerView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

GetStartupURL

None

¾

String/BSTR

GetURL

None

¾

String/BSTR

GoBack

None

¾

Long Integer

GoForward

None

¾

Long Integer

Refresh

None

¾

Long Integer

SetURL

szURL

String

Long Integer

Stop

None

¾

Long Integer

The following sample Visual Basic code demonstrates how to use the ExplorerView object:

'A simple example demonstrating the use of the various methods.

 

Dim ExplView As object

 

'Get the Views object

Set objViews = objApp.Views

 

'Load the Floating View (7), which has MyWebSite as the title.

Set ExplView = objViews.FindExplorerView("MyWebSite", 7)

If objViews.GetLastError <> 0 Then

   MsgBox "Error loading the floating Explorer View, exiting"

   objViews.ClearError

   Exit Sub

End If

List1.AddItem "View Type : (Should be 7)" & ExplView.Type

'Get the address currently open.

List1.AddItem "Get URL :" & ExplView.GetURL

'Load the URL www.actsoftware.com.

ExplView.SetURL "www.actsoftware.com"

 

ExplView.Close

Set ExplView = Nothing

Set objViews = Nothing

GetStartupURL Method

Description    Returns the URL that the Explorer uses when it is launched.

Object            ExplorerView

Syntax            object.GetStartupURL

Return type   String/BSTR

See also         GetURL, SetURL

GetURL Method

Description    Returns the current URL from the Explorer. Returns NULL on error.

Object            ExplorerView

Syntax            object.GetURL

Return type   String/BSTR

GetLastError S_CON_DOC

See also         GetStartupURL, SetURL

GoBack Method

Description    Displays the contents of the previous URL in the history buffer. Returns S_OK.

Object            ExplorerView

Syntax            object.GoBack

Return type   Long Integer

GetLastError S_CON_DOC

See also         GoForward

GoForward Method

Description    Displays the contents of the next URL in the history buffer.

Object            ExplorerView

Syntax            object.GoForward

Return type   Long Integer

GetLastError S_CON_DOC

See also         GoBack

Refresh Method

Description    Refreshes the contents of the Explorer view using the current URL.

Object            ExplorerView

Syntax            object.Refresh

Return type   Long Integer

GetLastError S_CON_DOC

SetURL Method

Description    Sets the specified URL as the current URL for the Explorer.

Object            ExplorerView

Syntax            object.SetURL(szURL)

Parameters    szURL                    A string representing the new URL.

Return type   Long Integer

GetLastError S_CON_DOC

See also         GetURL

Stop Method

Description    Stops the Explorer from retrieving the contents of the current URL.

Object            ExplorerView

Syntax            object.Stop

Return type   Long Integer

GetLastError S_CON_DOC


Grid object methods

The Grid object provides an interface to use the Grid view in the ACT! application. The following methods apply only to the Grid object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

BOL

None

¾

Boolean

DeleteRow

lRowNo

Long Integer

Long Integer

EOL

None

¾

Boolean

GetColumnCount

None

¾

Long Integer

GetColumnID

lColNo

Long Integer

Long Integer

GetColumnName

lColNo

Long Integer

String/BSTR

GetCurrentRow

None

¾

Long Integer

GetField

lFieldID,
lRowNo

Long Integer, Long Integer

String/BSTR

GetFilter

lFilters,
vDate,
vUserID

Long Integer,
Variant,
Variant

Long Integer

GetLastError

None

¾

Long Integer

GetRowCount

None

¾

Long Integer

GetRowNumber

szUniqueID

String

Long Integer

GetUniqueID

lRowNo

Long Integer

String/BSTR

Goto

lRowNo

Long Integer

Long Integer

MoveFirst

None

¾

Long Integer

MoveLast

None

¾

Long Integer

MoveNext

None

¾

Long Integer

Moveprevious

None

¾

Long Integer

RefreshGrid

None

¾

Long Integer

SelectRow

lRowNo,
bReserved

Long Integer,
Boolean

Long Integer

SetField

lFieldID,
lRowNo,
szFieldValue

Long Integer,
Long Integer,
String

Long Integer

SetFilter

lFilters, szDate,
szUserID…

Long Integer
String, String

Long Integer

Sort

lFieldID,
True|False

Long Integer, Boolean

Long Integer

BOL Method

Description    Returns True if the current record is the first in the grid or False if it is not the first in the grid or on error.

Object            Grid

Syntax            object.BOL

Return type   Boolean

GetLastError S_NO_DALLIST_VIEW, -2

See also         EOL, Goto, MoveFirst, MoveLast, MoveNext, Moveprevious

Example         Dim objApp as object

Dim objContactListView as object

Dim objContactListGrid 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:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objViews = objApp.Views

 

'Create the Contact List view.

Set objContactListView = objViews.Create(2, "CL")

 

'Create the Grid object for the Contact List.

Set objContactListGrid = objContactListView.GetGrid

If objContactListGrid.BOL <> True Then

   objContactListGrid.MoveFirst

Else

   MsgBox "Beginning of List"

End If

 

Set objContacttListGrid = Nothing

objContacttListView.Close

Set objCtListView = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

DeleteRow Method

Description    Deletes the specified record from the grid and table. Use the SelectRow method or go to the row to be deleted before using this method. This method cannot be used on Grid object for Group Membership tab (Contact view) or Contact tab (Group view). Returns S_ERROR on failure.

Object            Grid

Syntax            object.DeleteRow(lRowNo)

Parameters    lRowNo                  A long integer representing the row of the record to be deleted, in the range between 0 (zero) and one less than the value of the row count.

Return type   Long Integer

GetLastError S_DELETE_FAIL, S_DELETE_NOTALLOWED, S_INVALID_INPUT, S_NO_DALLIST_VIEW, -2

See also         GetRowCount

EOL Method

Description    Returns True if the current record is at the last in the grid and False if it is not the last in the grid or on error.

Object            Grid

Syntax            object.EOL

Return type   Boolean

GetLastError S_NO_DALLIST_VIEW, -2

Example         Dim objApp as object

Dim objContactListView as object

Dim objContactListGrid 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:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objViews = objApp.Views

 

'Create the Contact List view.

Set objContactListView = objViews.Create(2, "CL")

 

'Create the Grid object for the Contact List.

Set objContactListGrid = objContactListView.GetGrid

If objContactListGrid.EOL <> True Then

   objContactListGrid.MoveLast

Else

   MsgBox "End of List"

End If

 

Set objContacttListGrid = Nothing

objContacttListView.Close

Set objCtListView = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetColumnCount Method

Description    Returns the total number of columns in the grid. Returns -1 on failure. Use GetLastError to get information on an error.

Object            Grid

Syntax            object.GetColumnCount

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW

Example         'Get the number of rows and columns in a list and

'then list all the Column IDs and column names

 

Dim objApp as object

Dim objTask as object

Dim objTaskGrid 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Initialize the Views object.

Set objViews = objApp.Views

 

'Create a Task List.

Set objTask = objViews.Create(4, "TL")

 

'Create the Task List view Grid Object.

Set objTaskGrid = objTask.GetGrid

 

'Get the number of rows and columns.

List1.AddItem "There are " & objTaskGrid.GetRowCount & " Tasks"

List1.AddItem "There are " & objTaskGrid.GetColumnCount &

   " Columns in the Task List"

 

'List all the columns and their names.

For i = 1 To objTaskGrid.GetColumnCount

   List1.AddItem objTaskGrid.GetColumnId(i) & " : " &

       objTaskGrid.GetColumnName(i)

Next i

 

List1.AddItem "Closing Task List view"

objTask.Close

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetColumnID Method

Description    Returns the Field ID of the column in the grid. Returns -1 on failure. Use GetLastError to get information on an error.

Object            Grid

Syntax            object.GetColumnID(lColNo)

Parameters    lColNo                   A long integer representing the column of the record in the grid, in a range between 0 and one less than the value of GetColumnCount.

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, S_INVALID_INPUT

Example         Dim objCView As Object

Dim objViews As Object

Dim objTask As Object

Dim objTaskGrid As Object

Dim i As Integer

Dim iColumnCount As Integer

Dim objApp As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

Set objViews = objApp.Views

 

'Create a task list.

Set objTask = objViews.Create(4, "TL")

'Created the TaskView.

Set objTaskGrid = objTask.GetGrid

iColumnCount = objTaskGrid.GetColumnCount

For i=0 to iColumnCount

   MsgBox "Column ID: " & objTaskGrid.GetColumnID(i) & " has name: "

       & objTaskGrid.GetColumnName(i)

Next i

objTask.Close

 

Set objViews = Nothing

Set objApp = Nothing

GetColumnName Method

Description    Returns the name of the column in the grid. Returns a blank string or NULL on error.

Object            Grid

Syntax            object.GetColumnName(lColNo)

Parameters    lColNo                   A long integer representing the name of the column in the grid, in a range between 0 and one less than the value of GetColumnCount.

Return type   String/BSTR

GetLastError S_NO_DALLIST_VIEW

Example         See GetColumnCount.

GetCurrentRow Method

Description    Returns the index of the row currently being edited in the grid. The row number is in a range between 0 and one less than the value of GetRowCount. Returns -1 if no row is currently being edited and on failure. Use GetLastError to get information on an error.

Object            Grid

Syntax            object.GetCurrentRow

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

GetField Method

Description    Gets the value of the specified field in the specified row. Returns a blank string or NULL if the specified field does not exist, and on failure. Use GetLastError to get information on an error.

Object            Grid

Syntax            object.GetField(lFieldID, lRowNo)

Parameters    lFieldID                 A long integer representing the field ID of the field whose value is to be retrieved. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

lRowNo                  A long integer representing the row number of the field, in a range between 0 and one less than the value of GetRowCount.

Return type   String/BSTR

GetLastError S_INVALID_ID, S_NO_DALLIST_VIEW, S_INVALID_INPUT, S_GETFIELD_FAIL

See also         SetField

Example         See GetGrid in the ContactListView object.

GetFilter Method (requires ACT! 4.0 or later)

Description    Gets the settings of the filters on the Notes/History or Activities tab of the Contacts or Groups view, or the Task List view. First you must define empty variables, then this method returns values representing settings of the filters. Returns S_ERROR on failure.

Caution: In Visual C++ you need to initialize vDate and vUserID before using this method.

Object            Grid

Syntax            object.GetFilter(lFilters, vDate, vUserID)

Parameters    lFilters                   A long integer type variable containing the settings of filters on the Notes/History tab, Activities tab, or Task List view. After you define lFilters, a total is returned that represents all selected filters.

The following table lists the values that are included in the total for lFilters for the Notes/History tab.

Value

Option selected

 

Value

Option selected

1

Show data for All Users

 

8

Show Attachments

2

Show Notes

 

16

Show E-mail (requires ACT! 2000 or later)

4

Show Histories

 

 

 

                                                      The following table lists the values that are included in the total for lFilters for the Activities tab or the Task List view.

Value

Option selected

 

Value

Option selected

1

Show data for All Users

 

32

Show High priority activities

2

Show Cleared Activities

 

64

Show Medium priority activities

4

Show Calls

 

128

Show Low priority activities

8

Show Meetings

 

256

Show Only Timeless activities

16

Show To-do’s

 

512

Show Outlook activities (requires ACT! 2000 or later and Outlook)

                        vDate                     A variant (pointer to VARIANT in Visual C++) type variable containing the setting of the Dates To Show filter, returned in the following format:

Type\StartDate\EndDate

The following table lists the values returned for the Type field. For types 1 to 5 the StartDate and EndDate are not returned. For type 6 StartDate and EndDate are returned in mm/dd/yy format.

Value

Option selected

 

Value

Option selected

1

Show All

 

4

Show Today

2

Show Past

 

5

Show Tomorrow
(not supported)

3

Show Today And Future

 

6

Show Date Range

                        vUserID                 A variant (pointer to VARIANT in Visual C++) type variable containing the Unique ID(s) of users selected for the filter. The values are returned in the following format:

                              ID1ID2ID3

Note: Multiple Unique IDs are returned as a continuous string of 12‑character values, with no delimiters between the Unique ID values.

Return type   Long Integer

GetLastError S_INVALID_ID, S_NO_DALLIST_VIEW, S_INVALID_INPUT, S_GETFIELD_FAIL

See also         SetField, SetFilter

Example         Set objViews = objApp.Views

Set objCView = objViews.Create(1, "CV")

objCView.SetActiveTab "Notes/History"

Set objNH = objCView.NotesHistory

 

'Get the current filter settings.

objNH.GetFilter x, y, z

j = 0 Or 1 Or 2 Or 8 Or 4

 

'Set filter to select all notes, histories, e-mails, and attachments.

'Dates to Show is All and all users are selected.

objNH.SetFilter j, 1, " "

 

'Add the note and get the Unique ID.

uid = objCView.AddNoteHistoryEx(100)

 

'Get the row number.

nRow = objNH.GetRowNumber(uid)

 

'Set the regarding text.

objNH.SetField NHF_Text, i, "I am adding a test note"

 

'Reset the filter settings back to the previous settings.

objNH.SetFilter x, y, z

 

Set objNH = Nothing

Set objCView = Nothing

Set objViews = Nothing

GetLastError Method

Description    Returns a long integer representing the last error code for the object. For a list of error codes, see the following chapter.

Object            Grid

Syntax            object.GetLastError

Return type   Long Integer

GetRowCount Method

Description    Returns the total number of records or rows in the grid. Returns -1 on failure. Use GetLastError to get information on an error.

Note: The total returned by this method is the total number of records that have been processed for the grid when the method was used. You may need to add a pause to get a complete total.

Object            Grid

Syntax            object.GetRowCount

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW

Example         See GetColumnCount.

GetRowNumber Method

Description    Returns the row number of the specified record in the grid. The row number is in a range between 0 and one less than the value of GetRowCount. Returns -1 if the row is not visible in the window or the specified row does not exist, and on failure. Use GetLastError to get information on an error.

Object            Grid

Syntax            object.GetRowNumber(szUniqueID)

Parameters    szUniqueID            A string representing the Unique ID of the row.

Return type   Long Integer

GetLastError -2

Example         See GetColumnCount; AddNewActivityEx in ContactView object

GetUniqueID Method

Description    Returns the Unique ID of the specified row in the grid.

Object            Grid

Syntax            object.GetUniqueID(lRowNo)

Parameters    lRowNo                  A long integer representing the row number of the row, in a range between 0 and one less than the value of GetRowCount.

Return type   String/BSTR

GetLastError S_INVALID_INPUT, S_NO_DALLIST_VIEW, -2

Example         See AddNewActivityEx in ContactView object.

Goto Method

Description    Makes the specified record the current record.

Object            Grid

Syntax            object.Goto(lRowNo)

Parameters    lRowNo                  A long integer representing the row number of the row, in a range between 0 and one less than the value of GetRowCount.

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         MoveFirst, MoveLast, MoveNext, Moveprevious

MoveFirst Method

Description    Displays the first record in the grid.

Object            Grid

Syntax            object.MoveFirst

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         BOL, EOL, MoveLast, MoveNext, Moveprevious

Example         See BOL.

MoveLast Method

Description    Displays the last record in the grid.

Object            Grid

Syntax            object.MoveLast

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         BOL, EOL, MoveFirst, MoveNext, Moveprevious

Example         See EOL.

MoveNext Method

Description    Displays the next record in the grid. Returns S_NONE if the next record does not exist.

Object            Grid

Syntax            object.MoveNext

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         BOL, EOL, MoveFirst, MoveLast, Moveprevious

Moveprevious Method

Description    Displays the previous record in the grid. Returns S_NONE if the previous record does not exist.

Object            Grid

Syntax            object.Moveprevious

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         BOL, EOL, MoveFirst, MoveLast, MoveNext

RefreshGrid Method

Description    Refreshes the contents of the grid.

Object            Grid

Syntax            object.RefreshGrid

Return type   Long Integer

GetLastError -2

SelectRow Method

Description    Selects (highlights) the specified row. Returns S_ERROR on failure or if the specified row does not exist. Use GetLastError to distinguish between the two cases.

Object            Grid

Syntax            object.SelectRow(lRowNo, bReserved)

Parameters    lRowNo                  A long integer representing the row number of the field.

bReserved              A Boolean value reserved for future use.

Return type   Long Integer

GetLastError S_NO_DALLIST_VIEW, -2

See also         Goto

SetField Method

Description    Sets the value of the specified field in the specified row. Returns S_ERROR on failure or if the specified field does not exist. Use GetLastError to distinguish between the two cases.

Object            Grid

Syntax            object.SetField(lFieldID, lRowNo, szFieldValue)

Parameters    lFieldID                 A long integer representing the field ID of the field whose value is to be set. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

lRowNo                  A long integer representing the row number of the field, in a range between 0 and one less than the value of RowCount.

szFieldValue          A string containing the field value.

Return type   Long Integer

GetLastError S_INVALID_ID, S_INVALID_INPUT, S_NO_DALLIST_VIEW, S_SET_NOT_ALLOWED, S_SETFIELD_FAIL, S_STOP_EDIT, -2

See also         GetField

Example         See AddNewActivityEx in ContactView and TaskListView objects, AddNoteHistory in ContactView object, AddNote in GroupView object, AddNewContactEx in ContactListView object.

SetFilter Method (requires ACT! 4.0 or later)

Description    Sets the filters on the Notes/History or Activities tab of the Contacts or Groups view, or the Task List view. This should be done before adding records into the grid. This method is recommended to avoid incorrect information getting added to newly added Notes/History and Activity records. Returns S_ERROR on failure.

Object            Grid

Syntax            object.SetFilter(lFilters, szDate, szUserID…)

Parameters    lFilters                   A long integer obtained by ORing 0 with the values for filters on the Notes/History tab, Activities tab, or Task List view that you want selected.

The following table lists the values that are included in the total for lFilters for the Notes/History tab.

Value

Option selected

 

Value

Option selected

1

Show data for All Users

 

8

Show Attachments

2

Show Notes

 

16

Show E-mail (requires ACT! 2000)

4

Show Histories

 

 

 

                                                      The following table lists the values that are included in the total for lFilters for the Activities tab or the Task List view.

Value

Option selected

 

Value

Option selected

1

Show data for All Users

 

32

Show High priority activities

2

Show Cleared Activities

 

64

Show Medium priority activities

4

Show Calls

 

128

Show Low priority activities

8

Show Meetings

 

256

Show Only Timeless activities

16

Show To-do’s

 

512

Show Outlook activities (requires ACT! 2000 or later and Outlook)

                        szDate                    A string representing the dates for the items to be filtered, specified in the format:

Type\StartDate\EndDate

The following table lists values for the Type field. For types 1 to 5 the StartDate and EndDate fields are omitted. For type 6, specify the StartDate and EndDate in mm/dd/yy format.

Value

Option selected

 

Value

Option selected

1

Show All

 

4

Show Today

2

Show Past

 

5

Show Tomorrow
(not supported)

3

Show Today And Future

 

6

Show Date Range

                        szUserID                A string representing the Unique ID(s) of users specified for the filter. Specify szUserID in the following format:

                              ID1\ID2\ID3…

Note: Specify multiple Unique IDs as a continuous string of 12‑character values, with no delimiters between the Unique ID values.

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_DALLIST_VIEW

See also         GetField

Example         See GetFilter

Sort Method

Description    Sorts the display grid by the specified column.

Object            Grid

Syntax            object.Sort(lFieldID, True|False)

Parameters    lFieldID                 A long integer representing the field ID of the column in the grid to be used for the sort. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

True|False             Specify True to sort the specified column in descending order or False to sort it in ascending order.

Return type   Long Integer

GetLastError S_BUILD_ERROR, S_NO_DALLIST_VIEW, S_NO_SCHEMA, S_NOT_SORTABLE, -2

Example         See AddNewActivityEx in TaskListView object.


GroupView object methods

The GroupView object provides an interface to use the Group view in the ACT! application. The following methods apply only to the GroupView object. See “Common properties and methods” for properties and additional methods that apply to the GroupView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Activities

None

¾

Object/LPDISPATCH

AddMemberToGroup

szContactID

String

Long Integer

AddNew

None

¾

Long Integer

AddNewSubGroup

szUniqueID

String

Long Integer

AddNoteEx

None

¾

String/BSTR

AttachFile

szFilename

String

String/BSTR

BOL

None

¾

Boolean

ChangeToParentGroup

None

¾

Long Integer

ChangeToSubGroup

szUniqueID

String

Long Integer

Collapse

None

¾

Long Integer

ContactMembers

None

¾

Object/LPDISPATCH

Delete

None

¾

Long Integer

DeleteGroupFast

None

¾

Long Integer

EOL

None

¾

Boolean

Expand

None

¾

Long Integer

GetActiveTab

None

¾

String/BSTR

GetCount

None

¾

Short Integer

GetCurrentID

None

¾

String/BSTR

GetField

lFieldID

Long Integer

String/BSTR

GetSubGroupCount

None

¾

Long Integer

GetTabCount

None

¾

Short Integer

GetTabName

iTabNo

Short Integer

String/BSTR

Goto

szGroupID

String

Long Integer

GroupType

None

¾

Short Integer

IsExpanded

None

¾

Boolean

LookupAll

None

¾

Long Integer

LookupFieldEx

lFieldID,
szFieldValue,
iType

Long Integer,
String,
Short Integer

Long Integer

LookupPrevious

None

¾

Long Integer

MoveFirst

None

¾

Long Integer

MoveLast

None

¾

Long Integer

MoveNext

None

¾

Long Integer

Moveprevious

None

¾

Long Integer

NotesHistory

None

¾

Object/LPDISPATCH

RunQuery

szQueryFile

String

Long Integer

SaveQuery

szQueryFile

String

Long Integer

SetActiveTab

szTabName

String

Long Integer

SetField

lFieldID,
szFieldValue

Long Integer,
String

Long Integer

Activities Method

Description    Returns a dispatch pointer to a Grid object for the Activities tab. It does not make the Activities tab the active tab. The Activities tab must be the active tab before calling this method. Returns NULL on error.

Object            GroupView

Syntax            object.Activities

Return type   Object/LPDISPATCH

GetLastError S_NO_DALLIST_VIEW, S_MEM_ERROR, S_CON_DOC, S_FRM_VW_SYS

See also         GetActiveTab, NotesHistory, SetActiveTab

Example         'This example opens the Activities tab and returns the

'number of activities for the group.

 

Dim objGrp as object

Dim objActivities as object

Dim objContacts as object

 

Set objViews = objApp.Views

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

Set objGrp = objViews.Create(3, "Group")

 

'Set Activities to be the active tab.

objGrp.SetActiveTab "Activities"

objGrp.MoveFirst

Set objActivities = objGrp.Activities

 

'Print the row count, which is the same as the number of

'activities for the first group.

List1.AddItem "This group has " & objActivities.GetRowCount & " activities"

Set objActivities = Nothing

objGrp.Close

Set objGrp = Nothing

 

'Close the application.

Set objActivities = Nothing

Set objApp = Nothing

AddMemberToGroup Method

Description    Makes the specified contact as a member of the current group. The specified contact will appear in the Contacts tab of the Group view. This function fails if the specified contact is an existing member of the current group. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.AddMemberToGroup(szContactID)

Parameters    szContactID           A string representing the ID of the contact to be added.

Return type   Long Integer

GetLastError S_INVALID_ID, S_ADD_CONTACT, S_DUPLICATE_CONTACT

See also         AddContactToGroup in ContactView object

Example         'This example adds sContact to the current group.

 

Dim objApp as object

Dim objGrp as object

Dim objGrid as object

Dim sContact as string

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Group view.

Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

'Set the active tab to Contacts.

objGrp.SetActiveTab "Contacts"

 

Set objGrid = objGrp.ContactMembers

objGrp.AddMemberToGroup (sContact)

 

objGrp.Close

Set objGrp = Nothing

 

'Close the Application object.

Set objApp = Nothing

AddNew Method

Description    Displays a new group with all fields blank. Return S_ERROR on failure.

Object            GroupView

Syntax            object.AddNew

Return type   Long Integer

GetLastError S_MAIN_WND

See also         Delete

Example         'This example displays a new group.

 

Dim objApp as object

Dim objViews as object

Dim objGroup 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the GroupView object. This brings up the Groups view.

Set objGroup = objViews.Create(3, "MyGroup")

 

'Bring up the "Add New Group View".

'Add the new group "My group".

objGroup.AddNew

objGroup.SetField GF.Name, "My group"

objGroup.SetField GF.Division, "Division"

objGroup.SetField GF.Address1, "Address 1"

objGroup.SetField GF.City, "City"

objGroup.SetField GF.State, "State"

 

'Close the Group view.

objGroup.Close

objViews.CloseAll

Set objGroup = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

AddNewSubGroup Method (requires ACT! 2000 or later)

Description    Creates a subgroup for the specified parent group with all blank fields. Returns 0 if successful or returns an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            GroupView

Syntax            object.AddNewSubGroup (szUniqueID)

Parameters    szUniqueID            A string that represents the Unique ID of the parent group record for which you want to create the subgroup.

Return type   Long Integer

See also         ChangeToParentGroup, ChangeToSubGroup, Collapse, Expand, GetSubGroupCount, GroupType, IsExpanded

Example         'This example code adds a new subgroup to the first group in the

'Groups view.

 

Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

objGrp.MoveFirst

'Get the Unique ID of the first group in the list.

uid = objGrp.GetCurrentID

'Add a new subgroup to the first group.

objGrp.AddNewSubGroup uid

'Populate the group's details.

objGrp.SetField GF_Name, "Test Subgroup"

objGrp.SetField GF_Division, "Division : SDK"

objGrp.SetField GF_Region, "Western"

objGrp.SetField GF_Employees, "120"

AddNote Method (obsolete)

Use AddNoteEx instead of this method.

AddNoteEx Method (requires ACT! 4.0 or later)

Description    Adds a note in the Notes/History tab of the Groups view. Use SetField in the Grid object to set other fields in the newly created row. Returns a string containing the Unique ID of the note. Use GetFilter and SetFilter in the Grid object before using this method.

Note: This method is recommended to be used instead of AddNote in ACT! 4.0 or later.

Object            GroupView

Syntax            object.AddNoteEx

Return type   String/BSTR

GetLastError S_MAIN_WND, S_NO_DALLIST_VIEW, S_MEM_ERROR

See also         AddNote
AddNoteHistory in ContactView object
GetField, SetField in Grid object

Example         'This example adds a note to the current group.

 

Set objViews = objApp.Views

'Create the GroupView object.

Set objGrp = objViews.Create(3, "Group")

 

objGrp.SetActiveTab "Notes/History"

'Create the grid object in the Notes/History tab of the Groups view.

Set objNH = objGrp.NotesHistory

 

Dim uid As String

'Call AddNoteEx and get the Unique ID of the newly added record.

uid = objGrp.AddNoteEx

 

'Get the row number for the Unique ID.

i = objNH.GetRowNumber(uid)

 

'Set the Regarding text of the note.

objNH.SetField NHF_Text, i, "Group-Note Test1"

i = objNH.GetRowNumber(uid)

 

'Set the Date/Time of the note.

objNH.SetField NHF_UserTime, i, "1/1/98 8:00AM"

 

Set objNH = Nothing

objGrp.Close

Set objGrp = Nothing

AttachFile Method (requires ACT! 4.0 or later)

Description    Adds the specified file as an attachment to the Notes/History tab of the Groups view. Returns the Unique ID of the new Notes/History record for the attachment on success and NULL on failure.

Object            GroupView

Syntax            object.AttachFile(szFilename)

Parameters    szFilename             A string representing the complete path and the file name of the file to add as an attachment.

Return type   String/BSTR

GetLastError S_CON_DOC, S_NOT_FOUND, S_ERROR

See also         AttachFile in ContactView object

Example         'This example attaches a file (an attachment record) in the

'Notes/History tab of the current record.

 

Set objViews = objApp.Views

'Create the GroupView object.

Set objGrp = objViews.Create(3, "Group")

 

objGrp.SetActiveTab "Notes/History"

'Create the Grid object in the Notes/History tab of the Groups view.

Set objNH = objGrp.NotesHistory

 

'Create an attachment record in the Notes/History tab for the

'current view and attach the file.

objGrp.AttachFile "c:\My Documents\features.doc"

 

Set objNH = Nothing

objGrp.Close

Set objGrp = Nothing

BOL Method

Description    Indicates whether the current group is the first in the lookup (beginning of lookup). Returns True if the current group is at the beginning of the lookup or False if it is not at the beginning of lookup or on failure. Use GetLastError to distinguish between the two cases.

Object            GroupView

Syntax            object.BOL

Return type   Boolean

GetLastError S_MAIN_WND, S_CON_DOC

See also         EOL, Goto, MoveFirst, MoveLast, MoveNext, Moveprevious

ChangeToParentGroup Method (requires ACT! 2000 or later)

Description    Changes the current subgroup to a parent group. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            GroupView

Syntax            object.ChangeToParentGroup

Return type   Long Integer

See also         AddNewSubGroup, ChangeToSubGroup, Collapse, Expand, GetSubGroupCount, GroupType, IsExpanded

Example         'This example code changes the current subgroup to a parent group.

 

Set objViews = objApp.Views

Set objGrp = objViews.CreateEx(3, "GV",1)

objGrp.Goto guid

 

'If the group type is subgroup, then change it to a parent group.

If objGrp.GroupType = 0 Then

   objGrp.ChangeToParentGroup

End If

ChangeToSubGroup Method (requires ACT! 2000 or later)

Description    Changes the current group or subgroup to a subgroup of the specified parent group. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            GroupView

Syntax            object.ChangeToSubGroup (szUniqueID)

Parameters    szUniqueID            A string that specifies the Unique ID of the parent group record.

Return type   Long Integer

See also         AddNewSubGroup, ChangeToParentGroup, Collapse, Expand, GetSubGroupCount, GroupType, IsExpanded

Collapse Method (requires ACT! 2000 or later)

Description    Collapses the current node of the tree so that the subgroups of the current group are not visible.

Object            GroupView

Syntax            object.Collapse

Return type   Long Integer

See also         AddNewSubGroup, ChangeToParentGroup, ChangeToSubGroup, Expand, GetSubGroupCount, GroupType, IsExpanded

Example         Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

objGrp.MoveFirst

While objGrp.EOL <> True

   If objGrp.IsExpanded = False Then

   'Tree for that particular group is collapsed

       objGrp.Expand

   Else

       objGrp.Collapse

   End If

objGrp.MoveNext

Wend

Example         'This sample code goes through a group list.

Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

objGrp.MoveFirst

list1.AddItem "First Group is " & objGrp.GetField(GF_Name)

While objGrp.EOL <> True

   If objGrp.GroupType = 0 Then

       list1.AddItem objGrp.GetField(GF_Name) & " is a parent"

       objGrp.Expand

       For i = 1 To objGrp.GetSubGroupCount

          objGrp.MoveNext

          list1.AddItem " Sec group: " & objGrp.GetField(GF_Name)

       Next i

   Else

       list1.AddItem objGrp.GetField(GF_Name) & " is a sub group"

   End If

objGrp.MoveNext

Wend

ContactMembers Method

Description    Returns a dispatch pointer to a grid object for the Contacts tab in the Groups view. Returns NULL on error.

Object            GroupView

Syntax            object.ContactMembers

Return type   Object/LPDISPATCH

GetLastError S_NO_DALLIST_VIEW, S_MEM_ERROR, S_CON_DOC, S_FRM_VW_SYS

See also         Activities, GetActiveTab, NotesHistory, SetActiveTab

Example:        See AddMemberToGroup.

Delete Method

Description    Deletes the active (selected) group and all details about the group including activities, notes, and histories. Displays a dialog box to confirm the deletion. The contacts belonging to the group are not deleted. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.Delete

Return type   Long Integer

GetLastError S_MAIN_WND

See also         AddNew

DeleteGroupFast Method (requires ACT! 2000 or later)

Description    Deletes the current group without invoking a confirmation dialog box. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            GroupView

Syntax            object.DeleteGroupFast

Return type   Long Integer

See also         DeleteContactFast in ContactView object

EOL Method

Description    Indicates whether the current group is the last in the lookup (end of lookup). Returns True if the current group is at the end of the lookup or False if it is not at the end of lookup or on failure. Use GetLastError to distinguish between the two cases.

Object            GroupView

Syntax            object.EOL

Return type   Boolean

GetLastError S_MAIN_WND, S_CON_DOC

See also         BOL, Goto, MoveFirst, MoveLast, MoveNext, Moveprevious

Expand Method (requires ACT! 2000 or later)

Description    Expands the current node of the tree so the subgroups of the current group are visible. Returns 0 if successful or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            GroupView

Syntax            object.Expand

Return type   Long Integer

See also         AddNewSubGroup, ChangeToParentGroup, ChangeToSubGroup, Collapse, GetSubGroupCount, GroupType, IsExpanded

Example         Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

objGrp.MoveFirst

While objGrp.EOL <> True

   If objGrp.IsExpanded = False Then

   'Tree for that particular group is collapsed.

       objGrp.Expand

   Else

       objGrp.Collapse

   End If

objGrp.MoveNext

Wend

GetActiveTab Method

Description    Returns the name of the currently active tab in the Groups view.

Object            GroupView

Syntax            object.GetActiveTab

Return type   String/BSTR

GetLastError S_CON_DOC, S_NO_TAB_CONTAINER

See also         Activities, NotesHistory, SetActiveTab

Example         'This example gets the name of the active tab.

 

Dim objApp as object

Dim objViews as object

Dim objGroup as object

Dim i as integer

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the GroupView object. This brings up the GroupView.

Set objGroup = objViews.Create(3, "MyGroup") Dim objApp as object

 

'If the active tab is not Activities, set the active tab to Activities.

If objGrp.GetActiveTab <> "Activities" Then

   objGrp.SetActiveTab "Activities"

End If

 

'Close the Groups view.

objGroup.Close

objViews.CloseAll

Set objGroup = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetCount Method

Description    Returns the number of group records in the current lookup. Returns –1 on failure.

Object            GroupView

Syntax            object.GetCount

Return type   Short Integer

GetLastError S_CON_DOC, S_MAIN_WND

GetCurrentID Method

Description    Returns the Unique ID of the current group in the lookup. Returns NULL if no current group exists or on failure.

Object            GroupView

Syntax            object.GetCurrentID

Return type   String/BSTR

GetLastError S_CON_DOC, S_GRP_FRM

Example         'This example returns the Unique ID of the current group.

 

Dim objApp as object

Dim objViews as object

Dim objGroup as object

Dim i as integer

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the GroupView object. This brings up the Groups view.

Set objGroup = objViews.Create(3, "MyGroup")

 

objGrp.MoveFirst            'Move to the first Group.

 

'Go through all the groups and list their Unique IDs and the names of

'the groups.

'Get the number of groups.

For i = 1 To objGrp.GetCount

   'List the group Unique ID and group name.

   List1.AddItem objGrp.GetCurrentID & " : " & objGrp.GetField(GF_Name)

   objGrp.MoveNext

Next i

 

'Close the Groups view.

objGroup.Close

Set objGroup = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

GetField Method

Description    Returns the value of the specified field in the current group record. Returns NULL on failure.

Object            GroupView

Syntax            object.GetField(lFieldID)

Parameters    lFieldID                 A long integer representing the field ID of the field whose value is to be retrieved. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

Return type   String/BSTR

GetLastError S_CON_DOC, S_MAIN_WND, S_ACTIVE_REC, S_GETFIELD_FAIL

See also         SetField

GetSubGroupCount Method (requires ACT! 2000 or later)

Description    Returns the number of subgroups for the current parent group.

Object            GroupView

Syntax            object.GetSubGroupCount

Return type   Long Integer

See also         AddNewSubGroup, ChangeToParentGroup, ChangeToSubGroup, Collapse, Expand, GroupType, IsExpanded

Example         'Get the Views object.

Set objViews = objApp.Views

 

'Create the Groups view.

Set objGrp = objViews.Create(3, "Group")

 

'Move to the first group.

objGrp.MoveFirst

 

'Get the number of subgroups in the current group.

count = objGrp.GetSubGroupCount

list1.AddItem "First Group " & objGrp.GetField(GF_Name) & " has "

   & count & "sub groups"

GetTabCount Method (requires ACT! 4.0 or later)

Description    Returns the number of tabs in the Contact view, including tabs added using the Adding Extensible Views and Tabs to ACT! component of the ACT! SDK. Returns –1 on error.

Object            GroupView

Syntax            object.GetTabCount

Return type   Short Integer

GetLastError S_CON_DOC, S_FRM_VW_SYS, S_NO_TAB_CONTAINER

See also         GetTabName

Example:        See GetTabCount in ContactView object.

GetTabName Method (requires ACT! 4.0 or later)

Description    Returns a string containing the name of the specified tab in the Contact view. Returns NULL on error.

Object            GroupView

Syntax            object.GetTabName(iTabNo)

Parameters    iTabNo                   A short integer that specifies the tab index number, in a range between 0 and one less than the value returned by GetTabCount.

Return type   String/BSTR

GetLastError S_CON_DOC, S_FRM_VW_SYS, S_NO_TAB_CONTAINER

See also         GetTabCount

Example:        See GetTabCount in ContactView object.

Goto Method

Description    Displays the group specified by the group Unique ID. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.Goto(szGroupID)

Parameters    szGroupID             A string representing the group Unique ID.

Return type   Long Integer

GetLastError S_JUMP_TO_REC

See also         MoveFirst, MoveLast, MoveNext, Moveprevious

GroupType Method (requires ACT! 2000 or later)

Description    Returns 0 if the current group is a parent group or 1 if it is a subgroup.

Object            GroupView

Syntax            object.GroupType

Return type   Short Integer

See also         AddNewSubGroup, ChangeToParentGroup, ChangeToSubGroup, Collapse, Expand, GetSubGroupCount, IsExpanded

Example         Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

objGrp.MoveFirst

While objGrp.EOL <> True

   If objGrp.GroupType = 0 Then

       list1.AddItem objGrp.GetField(GF_Name) & " is a parent group"

   Else

       list1.AddItem objGrp.GetField(GF_Name) & " is a sub group"

   End If

objGrp.MoveNext

Wend

IsExpanded Method (requires ACT! 2000 or later)

Description    Returns True if the current group node of the tree is expanded or False if it is collapsed.

Object            GroupView

Syntax            object.IsExpanded

Return type   Boolean

See also         AddNewSubGroup, ChangeToParentGroup, ChangeToSubGroup, Collapse, Expand, GetSubGroupCount, GroupType

Example         Set objViews = objApp.Views

Set objGrp = objViews.Create(3, "Group")

 

objGrp.MoveFirst

While objGrp.EOL <> True

   If objGrp.IsExpanded = False Then

       'Tree for that particular group is collapsed.

       objGrp.Expand

   Else

       objGrp.Collapse

   End If

objGrp.MoveNext

Wend

LookupAll Method

Description    Creates and displays a lookup of all group records. The result of this lookup becomes the current lookup; the previous lookup is saved. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.LookupAll

Return type   Long Integer

GetLastError S_MAIN_WND

See also         LookupField, LookupMyRecord, LookupPrevious, RunQuery

LookupField Method (obsolete)

Use LookupFieldEx instead of this method.

LookupFieldEx Method (requires ACT! 4.0 or later)

Description    Creates and displays a group lookup based on a specified field value. The result becomes the current lookup and the previous lookup is saved. Returns S_ERROR on failure.

Note: This method extends the functionality of LookupField in ACT! 4.0 or later.

Object            GroupView

Syntax            object.LookupFieldEx(lFieldID, szFieldValue, iType)

Parameters    lFieldID                 A long integer representing the field ID of the field to be used in the lookup. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szFieldValue          A string representing the field value to match. Only groups with the specified field value in the specified field are retrieved.

iType                      A short integer indicating the action on the current lookup.

The following table lists the values for this parameter.

Value

Setting

0

Add to the current lookup

1

Narrow the current lookup

n

Specify any other number to replace the current lookup

Return type   Long Integer

GetLastError S_CON_DOC, S_INVALID_ID

See also         LookupAll, LookupField, LookupMyRecord, LookupPrevious, RunQuery

LookupPrevious Method

Description    Returns the most recent lookup. Replaces the current lookup with the most recent lookup. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.LookupPrevious

Return type   Long Integer

GetLastError S_MAIN_WND

See also         LookupAll, LookupField, LookupMyRecord, RunQuery

MoveFirst Method

Description    Displays the first group record in the current lookup. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.MoveFirst

Return type   Long Integer

GetLastError S_MAIN_WND

See also         BOL, EOL, MoveLast, MoveNext, Moveprevious

MoveLast Method

Description    Displays the last group record in the current lookup. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.MoveLast

Return type   Long Integer

GetLastError S_MAIN_WND

See also         BOL, EOL, MoveFirst, MoveNext, Moveprevious

MoveNext Method

Description    Displays the next group record in the current lookup. Returns S_NONE if there is no next record and S_ERROR on failure.

Object            GroupView

Syntax            object.MoveNext

Return type   Long Integer

GetLastError S_MAIN_WND

See also         BOL, EOL, MoveFirst, MoveLast, Moveprevious

Example         'This example displays the next group record.

 

objGroup.MoveNext

If objGroup.EOL then

   MsgBox "End of Group List"

End If

Moveprevious Method

Description    Displays the previous group record in the current lookup. Returns S_NONE if there is no previous record and S_ERROR on failure.

Object            GroupView

Syntax            object.Moveprevious

Return type   Long Integer

GetLastError S_MAIN_WND

See also         BOL, EOL, MoveFirst, MoveLast, MoveNext

NotesHistory Method

Description    Returns a dispatch pointer to a grid object for the Notes/History tab. The Notes/History tab must be the active tab before calling this method.

Object            GroupView

Syntax            object.NotesHistory

Return type   Object/LPDISPATCH

GetLastError S_NO_DALLIST_VIEW, S_MEM_ERROR, S_CON_DOC, S_FRM_VW_SYS

See also         Activities, GetActiveTab, SetActiveTab

RunQuery Method

Description    Loads and runs the specified saved query and creates and displays a lookup based on the query. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.RunQuery(szQueryFile)

Parameters    szQueryFile           A string representing the complete path and file name of the file containing the query to be executed.

Return type   Long Integer

GetLastError S_CON_DOC, S_MAIN_WND

See also         SaveQuery

Example         'This example loads and runs MYQUERY.QRY.

 

Dim objApp as object

Dim objViews as object

Dim objGroup as object

Dim i as long

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the GroupView object. This brings up the Group view.

Set objGroup = objViews.Create(3, "MyGroup")

 

'Load and run MYQUERY. The group that meets the criteria is displayed.

objGrp.RunQuery "C:\PROGRAM FILES\ACT\query\MyQuery.qry"

 

'Close the Group view.

objGroup.Close

objViews.CloseAll

Set objGroup = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

SaveQuery Method

Description    Saves the current query in the specified .QRY file. Returns S_ERROR on failure.

Object            GroupView

Syntax            object.SaveQuery(szQueryFile)

Parameters    szQueryFile           A string representing the complete path and file name of the file where the query will be saved. Query files must have a .QRY extension.

Return type   Long Integer

GetLastError S_CON_DOC, S_ACTIVE_REC

See also         RunQuery

SetActiveTab Method

Description    Sets the specified tab as the active tab.

Object            GroupView

Syntax            object.SetActiveTab(szTabName)

Parameters    szTabName      A string representing the name of the tab to be made active.

Return type   Long Integer

GetLastError S_INVALID_TAB, S_NO_TAB_CONTAINER, S_CON_DOC

See also         Activities, GetActiveTab, NotesHistory

Example         See GetActiveTab.

SetField Method

Description    Sets the value of the specified field in the current group record.

Object            GroupView

Syntax            object.SetField(lFieldID, szFieldValue)

Parameters    lFieldID                 A long integer representing the field ID of the field whose value is to be set. See the ACT! Database File Formats Reference appendix for lists of field IDs and names (Field constants).

szFieldValue          A string representing the value to set in the specified field.

Return type   Long Integer

GetLastError S_CON_DOC, S_MAIN_WND, S_ACTIVE_REC, S_SETFIELD_FAIL

See also         GetField

Example         'This example goes to a specific group by its group ID and

'sets the address fields.

 

Dim objApp as object

Dim objViews as object

Dim objGroup 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the GroupView object. This brings up the Group view.

Set objGroup = objViews.Create(3, "MyGroup")

 

'Go to the Group with group Unique ID of GUID.

objGrp.Goto GUID

 

'Set the Address, City, State, and Zip fields.

objGrp.SetField GF_Address1, "20300 Stevens Creek Blvd"

objGrp.SetField GF_City, "Cupertino"

objGrp.SetField GF_State, "CA"

objGrp.SetField GF_Zip, "95014"

 

'Close the Group view.

objGroup.Close

objViews.CloseAll

Set objGroup = Nothing

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing


MailComposeView object methods

The MailComposeView object provides an interface to use the E-mail Compose view in the ACT! application. The following methods apply only to the MailComposeView object. See “Common properties and methods” for properties and additional methods that apply to the MailComposeView object.

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

AddAttachment

szFileName

String

Long Integer

AddBccRecepient

szRecepient

String

Long Integer

AddCcRecepient

szRecepient

String

Long Integer

AddRecepient

szRecName

String

Long Integer

ClearAll

None

¾

Long Integer

ClearAttachments

None

¾

Long Integer

ClearBodyText

None

¾

Long Integer

ClearRecepients

None

¾

Long Integer

ClearSubject

None

¾

Long Integer

Send

None

¾

Long Integer

SetBodyText

szBody

String

Long Integer

SetSubject

szSubject

String

Long Integer

The following sample Visual Basic code demonstrates how to use the MailComposeView object.

'The following example opens the mail Inbox , sets cc:Mail to be

'the active inbox, opens the MsgCompose view, adds recipients, sets

'the subject and body, adds an attachment, sends the message, and

'closes the E-mail view.

 

Dim objApp as object

Dim objViews as object

Dim objEmail as object

Dim objMailCompView 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Initialize the Views object.

Set objViews = objApp.Views

 

'Initialize the EmailView object – The E-mail view should be opened.

Set objEmail = objViews.Create(6, "MyMail")

objEmail.SetActiveInbox ("cc:Mail")   'Set cc:Mail to be the active Inbox.

 

'Set the MsgComposeView – This view should open now.

Set objMailCompView = objEmail.MsgComposeView

 

'Add Contact1 as the recipient.

objMailCompView.AddRecepient ("Contact1")

 

'Add Subject1 as the subject of the message.

objMailCompView.SetSubject ("Subject1")

 

'Body1 is the body of the message.

objMailCompView.SetBodyText ("Body1")

 

'Add an attachment c:\attachment.txt.

objMailCompView.AddAttachment ("c:\attachment.txt")

 

'Send the message.

objMailCompView.Send

 

'Clear all fields.

objMailCompView.ClearAll

objMailCompView.Close

 

'Close the E-mail view.

objEmail.Close

Set objEmail = Nothing

 

'Close the application.

Set objViews = Nothing

Set objApp = Nothing

AddAttachment Method

Description    Adds the specified file name as an attachment to the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.AddAttachment(szFileName)

Parameters    szFileName            A string representing the file name (with path) to attach to the message.

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAll, ClearAttachments

AddBccRecepient Method (requires ACT! 2000 or later)

Description    Adds the specified name as a blind copy (bcc:) to the mail recipients list. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.AddBccRecepient (szRecepient)

Note: Use this exact spelling.

Parameters    szRecepient            A string representing the name of the new recipient.

Return type   Long Integer

See also         AddCcRecepient

Example         Set objViews = objApp.Views

 

'Create the E-mail Inbox view.

Set objEmail = objViews.Create(6, "e")

objEmail.OpenInbox ("cc:Mail")

 

'Create the Message Compose View object.

Set objMailCompView = objEmail.MsgComposeView

'Add the "To" Recipient.

objMailCompView.AddRecepient ("Recipient1@actsoftware.com")

 

'Add the "cc" Recipient.

objMailCompView.AddCCRecepient ("Recipient2@actsoftware.com")

 

'Add the "bcc" Recipient.

objMailCompView.AddBCCRecepient ("Recipient3@actsoftware.com")

 

objMailCompView.SetSubject ("Test Message")

 

objMailCompView.SetBodyText ("Test Body")

 

objMailCompView.Send

objMailCompView.Close

Set objMailCompView = Nothing

Set objViews = Nothing

AddCcRecepient Method (requires ACT! 2000 or later)

Description    Adds the specified name as a carbon copy (cc:) to the mail recipients list. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.AddCcRecepient (szRecepient)

Note: Use this exact spelling.

Parameters    szRecepient            A string representing name of the new recipient.

Return type   Long Integer

See also         AddBccRecepient

Example         See the AddBccRecepient method.

AddRecepient Method

Description    Adds the specified name to the mail recipients list. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.AddRecepient(szRecName)

Note: Use this exact spelling.

Parameters    szRecName             A string representing the name of the new recipient.

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAll, ClearRecepients

ClearAll Method

Description    Clears all fields (Recipients, Subject, Body of message, and Attachments) in the mail compose view. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.ClearAll

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAttachments, ClearBodyText, ClearRecepients, ClearSubject

ClearAttachments Method

Description    Clears the specified file name as an attachment to the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.ClearAttachments

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         AddAttachment, ClearAll

ClearBodyText Method

Description    Clears the body of the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.ClearBodyText

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAll, SetBodyText

ClearRecepients Method

Description    Clears the recipients field in the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.ClearRecepients

Note: Use this exact spelling.

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         AddRecepient, ClearAll

ClearSubject Method

Description    Clears the subject for the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.ClearSubject

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         SetSubject

Send Method

Description    Sends the composed message. Recipient names and attachment files are validated. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.Send

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

SetBodyText Method

Description    Sets the specified text as the body for the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.SetBodyText(szBody)

Parameters    szBody                   A string representing the body of the message.

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAll, ClearBodyText

SetSubject Method

Description    Sets the specified text as the subject for the message. Returns S_ERROR on failure.

Object            MailComposeView

Syntax            object.SetSubject(szSubject)

Parameters    szSubject               A string representing the subject for the message.

Return type   Long Integer

GetLastError S_NO_COMPOSE_VW

See also         ClearAll, ClearSubject


Preferences object properties and methods

The Preferences object provides an interface to manipulate user preferences in the ACT! application. The following properties and methods apply only to the Preferences object.

Note: The Preferences object cannot be used by users with Browse security level. Users must have Standard or Administrator security level to use the Preferences object.

Properties

Property name

Parameter(s)

Parameter type(s)

Value type

Access

AttachMsgToContact

[= True|False]

Boolean

Boolean

Read/Write

AttachToMsgUsing

[= iFormat]

Short Integer

Short Integer

Read/Write

CalendarStartTime

[= szTime]

String/BSTR

String/BSTR

Read/Write

CalendarWeekStartsOn

[= szDay]

String/BSTR

String/BSTR

Read/Write

CalMinDurationForBanner

[= lDuration]

Long Integer

Long Integer

Read/Write

CheckScheduleConflicts

[= True|False]

Boolean

Boolean

Read/Write

ContactSalutation

[= lSalutation]

Long Integer

Long Integer

Read/Write

DefaultContactLayout

[= szLayout]

String/BSTR

String/BSTR

Read/Write

DefaultGroupLayout

[= szLayout]

String/BSTR

String/BSTR

Read/Write

DisplayCountryCode

[= True|False]

Boolean

Boolean

Read/Write

EnableSpeedLoader

[= True|False]

Boolean

Boolean

Read/Write

ExitPrompt

[= True|False]

Boolean

Boolean

Read/Write

GenerateSynchReport

[= True|False]

Boolean

Boolean

Read/Write

NewActivitiesPrivate

[= True|False]

Boolean

Boolean

Read/Write

NewActivitiesSeparate

[= True|False]

Boolean

Boolean

Read/Write

NewContactsPrivate

[= True|False]

Boolean

Boolean

Read/Write

NewGroupsPrivate

[= True|False]

Boolean

Boolean

Read/Write

PromptToPrintEnvelope

[= True|False]

Boolean

Boolean

Read/Write

ReceivedSynchLocation

[= szLocation]

String/BSTR

String/BSTR

Read/Write

RememberPassword

[= True|False]

Boolean

Boolean

Read/Write

RemindToBackup

[= lDays]

Long Integer

Long Integer

Read/Write

ReturnReceipt

[= True|False]

Boolean

Boolean

Read/Write

SecondGroupColumn

[= szClName]

String/BSTR

String/BSTR

Read/Write

ShowContactParsingDialog

[= True|False]

Boolean

Long Integer

Read/Write

ShowCurrentMonthOnly

[= True|False]

Boolean

Boolean

Read/Write

StartupDatabase

[= szDBName]

String/BSTR

String/BSTR

Read/Write

StartupMacro

[= szMacroName]

String/BSTR

String/BSTR

Read/Write

TabNavigation

[= True|False]

Boolean

Boolean

Read/Write

UseAct20Keys

[= True|False]

Boolean

Boolean

Read/Write

UseDialer

[= True|False]

Boolean

Boolean

Read/Write

UseLastDBonStartup

[= True|False]

Boolean

Boolean

Read/Write

UseTypeahead

[= True|False]

Boolean

Boolean

Read/Write

WaitTime

[= lMinutes]

Long Integer

Long Integer

Read/Write

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

ClearError

None

¾

Void

GetActivityCleanupStyle

None

¾

Short Integer

GetAttachmentInfo

None

¾

String/BSTR

GetCalendarIncrements

iType

Short Integer

Short Integer

GetDataToSynch

None

¾

Long Integer

GetDBMaintReminderInfo

bEnabled, lDayInterval

Boolean,
Long Integer

Boolean,
Long Integer

GetDefaultApplication

iType

Short Integer

String/BSTR

GetDefaultLocation

iType

Short Integer

String/BSTR

GetEmailInboxSettings

iDelete,
iPollTime

Short Integer,
Short Integer

Long Integer

GetEmailNewMsgInfo

None

¾

String/BSTR

GetEmailSystem

None

¾

String/BSTR

GetLastError

None

¾

Long Integer

GetNameSettings

iType

Short Integer

String/BSTR

GetSchdActivityDefaults

iType

Short Integer

String/BSTR

GetSchdAutoRollover

None

¾

Short Integer

GetStyle

iWindowType

Short Integer

String/BSTR

GetSynchScheduleInfo

None

¾

String/BSTR

GetSynchSettings

None

¾

String/BSTR

GetSynchUpdateInfo

None

¾

Long Integer

SetActivityCleanupStyle

iStyle

Short Integer

Long Integer

SetAttachmentInfo

szNewInfo

String

Long Integer

SetCalendarIncrements

iType,
iIncrement

Short Integer,
Short Integer

Long Integer

SetDataToSynch

lInfo

Long Integer

Long Integer

SetDBMaintReminderInfo

True|False, lDayInterval

Boolean,
Long Integer

Void

SetDefaultApplication

iType,
szAppName

Short Integer,
String

Long Integer

SetDefaultLocation

iType,
szLocation

Short Integer,
String

Long Integer

SetEmailInboxSettings

iDelete,
iPollTime

Short Integer,
Short Integer

Long Integer

SetEmailNewMsgInfo

szInfo

String

Long Integer

SetEmailSystem

szSystem

String

Long Integer

SetNameSettings

iType,
szList

Short Integer,
String

Long Integer

SetSchdActivityDefaults

iType,
szDefaults

Short Integer,
String

Long Integer

SetSchdAutoRollover

iRollover

Short Integer

Long Integer

SetStyle

iWindowType,
szFontName

Short Integer,
String

Long Integer

SetSynchScheduleInfo

szInfo

String

Long Integer

SetSynchSettings

szInfo

String

Long Integer

SetSynchUpdateInfo

lInfo

Long Integer

Long Integer

AttachMsgToContact Property (requires ACT! 4.0 or later)

Description    Gets and sets the mode for attaching new e-mail messages to contacts. Use this property to get, select, or deselect (that is, enable or disable) the Attach To Contact(s) option under New Message Settings in the E-mail tab of the Preferences dialog box. Returns True if the Attach To Contact(s) option is selected or False if this option is deselected. Returns False on failure.

Object            Preferences

Syntax            object.AttachMsgToContact [= True|False]

Parameters    True|False              Specify True to select the Attach To Contact(s) option or False to deselect this option. Omit this optional parameter to get the setting (selected or deselected) of the Attach To Contact(s) option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

'Set the property AttachMsgToContact to True.

objPref.AttachMsgToContact True

 

Set objPref = Nothing

Set objApp = Nothing

AttachToMsgUsing Property (requires ACT! 4.0 or later)

Description    Gets and sets the mode for the format to use when attaching contacts or activities to e-mail messages. Use this property to get, select, or deselect (that is, enable or disable) the Attaching Contacts/activities To Messages options in the General tab of the Preferences dialog box. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.AttachToMsgUsing [= iFormat]

Parameters    iFormat                  A short integer representing the format to use when attaching contacts or activities to e-mail messages.

The following table lists the values that are set or returned for this property.

Value

Option

1

ACT! data (for use with other ACT! users)

2

vCard/vCalendar (MS Outlook compatible)

3

Attach using both formats

Value type      Short Integer, Read/Write

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Set the property AttachToMsgUsing to 1 (use ACT! data format).

objPref.AttachToMsgUsing 1

 

Set objPref = Nothing

Set objApp = Nothing

CalendarStartTime Property

Description    Gets and sets the time of day to begin the daily and weekly calendars. Returns NULL on error.

Object            Preferences

Syntax            object.CalendarStartTime [= szTime]

Parameters    szTime                    A string that specifies the time of day to start the daily and weekly calendars. Omit this optional parameter to get the starting time for the calendars. The format of szTime is "hh:mm AM|PM".

Value type      String/BSTR, Read/Write

See also         CalendarWeekStartsOn

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets the Start Time 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set the Calendar Start Time to 7:00AM (Calendars tab).

objPreferences.CalendarStartTime = "7:00AM"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

CalendarWeekStartsOn Property

Description    Gets and sets the starting day of the week of the calendars. Returns NULL on error.

Object            Preferences

Syntax            object.CalendarWeekStartsOn [= szDay]

Parameters    szDay                     A string that specifies the starting day of the week. Omit this optional parameter to get the starting day. The parameter szTime can be “Sunday” or “Monday”.

Value type      String/BSTR, Read/Write

See also         CalendarStartTime

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets the starting day for the monthly calendar 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Sunday option in the Calendar Week Starts On group

'box (Calendars tab).

objPreferences.CalendarWeekStartsOn "Sunday"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

CalMinDurationForBanner Property (requires ACT! 4.0 or later)

Description    Gets and sets a value that represents the minimum duration of activities for which the full day banner is to be displayed. Use this property to get and set the Show Full Day Banner For Activities With Duration Of x Or Longer option in the Preferences Calendars tab, where x is the number of minutes, hours, or days. Returns –1 on failure.

Object            Preferences

Syntax            object.CalMinDurationForBanner [= lDuration]

Parameters    lDuration               A long integer in that specifies the minimum duration in minutes for full day banners in the calendar. Omit this optional parameter to get the setting of the Show Full Day Banner For Activities With Duration Of x Or Longer option in the Preferences Calendars tab.

                              The following table lists the values that are set or returned for this property. If an invalid value is specified, the default setting of 8 hours is used.

Value

Setting

 

Value

Setting

0

0 minutes

 

120

2 hours

5

5 minutes

 

180

3 hours

10

10 minutes

 

480

8 hours

15

15 minutes

 

1440

1 day

30

30 minutes

 

7200

5 days

45

45 minutes

 

43200

30 days

60

1 hour

 

 

 

Value type      Long Integer, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         'This example sets 2 hours as the minimum duration of activities

'for which the full day banner is to be displayed.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Show full day banner for activities with a duration of 2 hours is set.

objPreferences.CalMinDurationForBanner = 120

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

CheckScheduleConflicts Property

Description    Gets and sets the mode of schedule conflict checking. Use this property to get, select, or deselect (that is, enable or disable) the Enable Activity Conflict Checking option in the Scheduling tab. If this option is selected, an alert message is displayed if an activity is scheduled that conflicts with or overlaps another activity.

Object            Preferences

Syntax            object.CheckScheduleConflicts [= True|False]

Parameters    True|False              Specify True to set schedule conflict checking or False to disable schedule conflict checking. Omit this optional parameter to get the setting (selected or deselected) of the Enable Activity Conflict Checking option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example enables activity conflict checking 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Enable Activity Conflict Checking option (Scheduling tab).

objPreferences.CheckScheduleConflicts = True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

ClearError Method (requires ACT! 4.0 or later)

Description    Clears the last error.

Object            Preferences

Syntax            object.ClearError

Return type   Void

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         GetLastError, SetActivityCleanupStyle

ContactSalutation Property (requires ACT! 4.0 or later)

Description    Gets and sets the value that represents the Salutation option to be used with contacts. Use this property to get and set the Salutation option in the Preferences Names tab.

Object            Preferences

Syntax            object.ContactSalutation [= lSalutation]

Parameters    lSalutation             A long integer in the range from 0 to 2 that specifies the option for the Salutation type. Omit this optional parameter to get the setting of the Salutation option in the Preferences Names tab.

                              The following table lists the values that are set or returned for this property.

Value

Setting

0

Use Contact’s Last Name

1

Use Contact’s First Name

2

Do Not Fill Salutation

Value type      Long Integer, Read/Write

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example selects the Use contact's first name option for

'Salutation in Names preferences.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Selects the Contacts First Name Option Button.

objPreferences.ContactSalutation 1

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

DefaultContactLayout Property

Description    Gets and sets the name (and path) of the layout file to use for contacts. The file name extension must be .CLY. Returns NULL on error.

Object            Preferences

Syntax            object.DefaultContactLayout [= szLayout]

Parameters    szLayout                A string that specifies the name and path of the layout file to be used for contacts. Omit this optional parameter to get the name of the layout file for contacts.

Value type      String/BSTR, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_FOUND, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         DefaultGroupLayout

Example         'This example specifies the layout file to use for contacts 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select C:\PROGRAM FILES\ACT\layout\Contact1.cly

'in the Default Contact Layout field (Startup tab).

objPreferences.DefaultContactLayout =

   "C:\PROGRAM FILES\ACT\layout\Contact1.cly"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

DefaultGroupLayout Property

Description    Gets and sets the name (and path) of the layout file to use for groups. The file name extension must be .GLY. Returns NULL on error.

Object            Preferences

Syntax            object.DefaultGroupLayout [= szLayout]

Parameters    szLayout                A string that specifies the name and path of the layout file to be used for groups. Omit this optional parameter to get the name of the layout file for groups.

Value type      String/BSTR, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_FOUND, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         DefaultContactLayout

Example         'This example specifies the layout file to use for groups 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select C:\PROGRAM FILES\ACT\layout\ACCOUNT5.gly

'in the Default Group Layout list (Startup tab).

objPreferences.DefaultGroupLayout =

   "C:\PROGRAM FILES\ACT\layout\ACCOUNT5.gly"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

DisplayCountryCode Property

Description    Gets and sets the mode for preceding phone numbers with a country code. Use this property to get, select, or deselect (that is, enable or disable) the Always Display Country Code in Phone Fields option in the General tab. If this option is selected, country codes are always displayed before a phone number in phone fields. Returns False on failure.

Object            Preferences

Syntax            object.DisplayCountryCode [= True|False]

Parameters    True|False              Specify True to display a country code before phone numbers or False if phone numbers are not preceded by a country code. Omit this optional parameter to get the setting (selected or deselected) of the Always Display Country Code in Phone Fields option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that phone numbers are prefixed with an

'country code 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set the Always Display Country Code option (General tab).

objPreferences.DisplayCountryCode True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

EnableSpeedLoader Property (requires ACT! 4.0 or later)

Description    Gets and sets the value of the Enable ACT! Speed Loader option in the Startup tab of the Preferences dialog box. Returns True if the Enable ACT! Speed Loader option is selected or False if it is deselected. Returns False on error.

Object            Preferences

Syntax            object.EnableSpeedLoader [= True|False]

Parameters    True|False              Specify True to select the Enable ACT! Speed Loader option or False to deselect it. Omit this optional parameter to get the setting (selected or deselected) of the Enable ACT! Speed Loader option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Turn off the Speed Loader option

objPref.EnableSpeedLoader False

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

ExitPrompt Property

Description    Gets and sets the mode of prompting before a user exits ACT! Use this property to get, enable, or disable (that is, select or deselect) the Prompt Before Exiting option in the General tab. If this option is selected, a confirmation message is displayed when the user exits ACT! Returns False on error.

Object            Preferences

Syntax            object.ExitPrompt [= True|False]

Parameters    True|False              Specify True to prompt the user before exiting ACT! or False to omit the prompt before a user exits ACT! Omit this optional parameter to get the setting (selected or deselected) of the Prompt Before Exiting option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that the user is prompted before quitting ACT!

'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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Prompt Before Exiting option (General tab).

objPreferences.ExitPrompt = True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

GenerateSynchReport Property (requires ACT! 4.0 or later)

Description    Gets and sets the Generate Synchronization Report option in the Preferences Synchronization tab. Returns S_ERROR on error.

 Object           Preferences

Syntax            object.GenerateSynchReport [= True|False]

Parameters    True|False              Specifies whether a synchronization report is to be generated. Specify True to select the Generate Synchronization Report option or False to deselect it. Omit this optional parameter to get the setting (selected or deselected) of the Generate Synchronization Report option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

GetActivityCleanupStyle Method

Description    Returns the style of representing cleared activities. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.GetActivityCleanupStyle

Return type   Short Integer

Comments     The following table lists the values that are returned by this method.

Value

Setting

 

Value

Setting

0

Gray cleared activities

 

2

Remove cleared activities

1

Strike out cleared activities

 

 

 

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetActivityCleanupStyle

GetAttachmentInfo Method (requires ACT! 4.0 or later)

Description    Returns a string representing the settings for the Attaching Messages To Contacts options in the Preferences E-mail tab. Returns NULL on error.

Object            Preferences

Syntax            object.GetAttachmentInfo

Return type   String/BSTR

Comments     The following fields are returned in order and separated by a backslash (\)

      AttachMode\Folder

AttachMode:

The following table lists the values returned for the AttachMode field.

Value

Setting

0

Ask me (the user) before saving the attached file.

1

Always save the attached file.

2

Never save the attached file.

                        Folder:

Contains the location of the folder specified in the Messages You Have Attached To Contacts Are Stored In option.

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetAttachmentInfo

GetCalendarIncrements Method

Description    Returns the calendar increments for the daily or weekly calendar. Returns -1 on failure. Use GetLastError to get information on an error.

Object            Preferences

Syntax            object.GetCalendarIncrements(iType)

Parameters    iType                      A short integer representing the calendar.

                              The following table lists the values for iType.

Value

Setting

301

Weekly calendar

302

Daily calendar

Return type   Short Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The returned value is 5, 10, 15, 30, 45, or 60.

See also         SetCalendarIncrements

GetDataToSynch Method (requires ACT! 4.0 or later)

Description    Returns a value that represents the settings for the Data To Synchronize options in the Preferences Synchronization tab. Returns S_ERROR on error.

Object            Preferences

Syntax            object.GetDataToSynch

Return type   Long Integer

Comments     The following table lists the values that are returned for this method.

Value

Setting

0

Do not Synchronize Activities or Notes/Histories

1

Synchronize Activities only

2

Synchronize Notes/Histories only

3

Synchronize Activities and Notes/Histories

GetLastError S_ERROR, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetDataToSynch

GetDBMaintReminderInfo Method (requires ACT! 2000 or later)

Description    Gets the values for the database maintenance reminder. Returns True if the reminder is set or False if it is not set; also returns the value (in days) for the database maintenance reminder.

Object            Preferences

Syntax            object.GetDBMaintReminderInfo(bEnabed, lDayInterval)

Parameters    bEnabled               A Boolean variable to contain the value returned for the database maintenance reminder setting.

lDayInterval          A long integer variable to contain the value returned for the database maintenance reminder setting.

Return type   Boolean, Long Integer

See also         SetDBMaintReminderInfo

Example         Dim objApp as object

Dim objPreferences as object

Dim bEnabled As Boolean

Dim lDay As Long

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

objApp.OpenFile C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

objPreferences.GetDBMaintReminderInfo bEnabled, lDay

List1.AddItem " Database Maintenance On " & bEnabled &

   " set for " & lDay & " days"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

GetDefaultApplication Method

Description    Returns the name of the default application to run for the word processor or fax software. Returns NULL on failure.

Object            Preferences

Syntax            object.GetDefaultApplication(iType)

Parameters    iType                      A short integer representing the type of application. Specify 0 to get the default word processor or 1 or to get the default fax software.

Return type   String/BSTR

GetLastError S_NO_FAX_DRVMGR, S_NO_SECURITY, S_NO_USER, S_NO_WP_DRIVER, S_NO_WP_DRVMGR, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetDefaultApplication

GetDefaultLocation Method

Description    Returns the default directory for the specified file type. Returns NULL on failure.

Object            Preferences

Syntax            object.GetDefaultLocation(iType)

Parameters    iType                      A short integer representing the file type.

                              The following table lists the values for iType.

Value

Setting

 

Value

Setting

0

Database

 

6

Layout

1

Document

 

7

Macro

2

Document template

 

8

Briefcase

3

Report, label, envelope

 

9

Outbox

4

Synchronize

 

10

Spelling dictionary

5

Query

 

11

NetLinks (requires ACT! 4.0 or later)

Return type   String/BSTR

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetDefaultLocation

GetEmailInboxSettings Method

Description    Returns the E-mail Inbox Settings options. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.GetEmailInboxSettings(iDelete, iPollTime)

Parameters    iDelete                   A short integer (pointer to a short integer in Visual C++) indicating whether confirmation is required when deleting messages. Specify 0 to select this option (confirm deletions) or 1 to deselect 1.

                        iPollTime                A short integer (pointer to a short integer in Visual C++) between 0 (zero) and 60 indicating whether to notify when new message arrives. A number greater than 0 (zero) is interpreted as the number of minutes; a value of 0 (zero) indicates that the property is cleared (not set).

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetEmailInboxSettings

Example         'This example gets the values of the Email inbox

'settings in the iDelete and iNotify parameters.

 

Dim iNotify as integer

Dim iDelete as integer

objPreferences.GetEmailInboxSettings iDelete, iNotify

List1.AddItem "GetEmailInboxSettings:"

List1.AddItem "Confirm when Deleting: " & iDelete &

   "Notify every " & iNotify & " Minutes"

GetEmailNewMsgInfo Method

Description    Returns the signature text and the mode of creating a history record when sending a new e‑mail message. Use this property to get the contents of the Signature Text and the setting of the Create History When Sent option under New Message Settings in the E-mail tab of the Preferences dialog box. Returns NULL on error.

Object            Preferences

Syntax            object.GetEmailNewMsgInfo

Return type   String/BSTR

Comments     The returned string contains the following two fields, separated by a backslash (\):

CreateHist\SigText

CreateHist indicates the setting of the Create History When Sent option. The value of 1 is returned if this option is selected and 0 (zero) is returned if it is deselected.

SigText contains the Signature Text for a new message.

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetEmailNewMsgInfo

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Get the property GetEmailNewMsgInfo in a string.

strEmailMsgInfo = objPref.GetEmailNewMsgInfo

 

Set objPref = Nothing

Set objApp = Nothing

GetEmailSystem Method (requires ACT! 4.0 or later)

Description    Returns a string containing the current e-mail system. Returns NULL on error or if no system is specified.

Object            Preferences

Syntax            object.GetEmailSystem

Return type   String/BSTR

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetEmailSystem

GetLastError Method (requires ACT! 4.0 or later)

Description    Returns a long integer representing the last error code for the object. For a list of error codes, see the following chapter.

Object            Preferences

Syntax            object.GetLastError

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Return type   Long Integer

GetNameSettings Method

Description    Returns a string containing the currently defined first-name prefixes, last-name prefixes, and last-name suffixes. Returns NULL on error.

Object            Preferences

Syntax            object.GetNameSettings(iType)

Parameters    iType                      A short integer. (Currently ignored.)

Return type   String/BSTR

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The returned string contains the following three fields, separated by a backslash (\):

FirstNamePrefixes\LastNamePrefixes\LastNameSuffixes

Within each field, prefixes or suffixes are separated by commas.

See also         SetNameSettings

GetSchdActivityDefaults Method

Description    Returns the schedule activity default settings. Returns NULL on failure.

Object            Preferences

Syntax            object.GetSchdActivityDefaults(iType)

Parameters    iType                      A short integer representing the activity type for which the defaults are required.

The following table lists the values for iType.

Value

Setting

 

Value

Setting

0

Calls

 

2

To-do’s

1

Meetings

 

 

 

Return type   String/BSTR

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     For the specified activity, the returned string contains the following six fields, separated by a backslash (\):

Priority\AlarmLeadTime\Duration\DefaultToTimeless\SetAlarm\PopupFields

Priority:

The following table lists the values returned for the Priority field.

Value

Setting

 

Value

Setting

0

High

 

2

Low

1

Medium

 

 

 

AlarmLeadTime:

The following table lists the values returned for the AlarmLeadTime field.

Value

Setting

 

Value

Setting

0

0 minutes

 

7

2 hours

1

5 minutes

 

8

3 hours

2

10 minutes

 

9

8 hours

3

15 minutes

 

10

1 day

4

30 minutes

 

11

5 days

5

45 minutes

 

12

30 days

6

1 hour

 

 

 

Duration:

The following table lists the values returned for the Duration field.

Value

Setting

 

Value

Setting

0

0 minutes

 

7

2 hours

1

5 minutes

 

8

3 hours

2

10 minutes

 

9

8 hours

3

15 minutes

 

10

1 day

4

30 minutes

 

11

5 days

5

45 minutes

 

12

30 days

6

1 hour

 

 

 

DefaultToTimeless:

DefaultToTimeless indicates the setting of the Default x To Timeless option. The value of 1 is returned if this option is selected and 0 (zero) is returned if it is deselected.

SetAlarm:

SetAlarm indicates the setting of the Set Alarm For x option. The value of 1 is returned if this option is selected and 0 (zero) is returned if it is deselected.

PopupFields:

A value in a range from 0 to 31 that indicates which fields are displayed in the Schedule Activity dialog box. Popup field preferences are provided only in ACT! 4.0 or later.

PopupFields is created by ORing the values in the following table.

Value

Setting

 

Value

Setting

1

Date

 

8

Regarding

2

Time

 

16

Alarm Lead Time

4

Duration

 

 

 

See also         SetSchdActivityDefaults

GetSchdAutoRollover Method

Description    Returns the automatic rollover settings. The returned integer can be used to extract the rollover settings for calls, meetings, and to-do’s by ANDing it with appropriate values. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.GetSchdAutoRollover

Return type   Short Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The returned value contains a total that represents all selected activity types. For example, a returned value of “5” indicates that the Calls and To-do’s options are selected.

                        The following table lists the values that are added to get the total value that is returned for this method.

Value

Setting

 

Value

Setting

1

Calls

 

4

To-do’s

2

Meetings

 

 

 

See also         SetSchdAutoRollover

Example         Set objPref = objApp.Preferences

Dim strType As String

Dim i as integer

strType = ""

i = objPref.GetSchdAutoRollover

 

'Now And the result to get the types

If i And 1 Then strType = "Calls "

If i And 2 Then strType = strType & "Meetings "

If i And 4 Then strType = strType & "Todo "

List1.AddItem strType

GetStyle Method

Description    Returns the name of the font used in the specified window. Returns NULL on error.

Object            Preferences

Syntax            object.GetStyle(iWindowType)

Parameters    iWindowType         A short integer representing the window type.

The following table lists the values for this parameter:

Value

Setting

 

Value

Setting

0

Contact List

 

5

Weekly calendar

1

Notes/History tab

 

6

Monthly calendar

2

Activities tab

 

7

E-mail

3

Task List

 

8

Contacts tab

4

Daily calendar

 

9

Groups view

Return type   String/BSTR

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         SetDefaultLocation, SetStyle

GetSynchSchedule Method (obsolete)

Use GetSynchScheduleInfo instead of this method.

GetSynchScheduleInfo Method (requires ACT! 4.0 or later)

Description    Returns the settings for the auto synchronization schedule. Returns NULL on error.

Note: Use this method instead of GetSynchSchedule in ACT! 4.0 or later.

Object            Preferences

Syntax            object.GetSynchScheduleInfo

Return type   String/BSTR

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The returned string contains the following two fields, separated by a backslash (\):

SynchDays\ SynchTime

                        SynchDays             A value between 0 and 128 representing the days of the week on which synchronization is to be performed. The value must be ANDed with specific defines representing the week bit set.

                              The following table lists the values for days of a week returned for the SynchDays field.

Value

Day of week

 

Value

Day of week

1

Sunday

 

16

Thursday

2

Monday

 

32

Friday

4

Tuesday

 

64

Saturday

8

Wednesday

 

 

 

                        SynchTime             Synchronization time(s) in Windows Regional Settings Time style (hh:mm AM|PM) format. The synchronization times are returned in the following format:

\SynchTime\SynchTime\SynchTime...

See also         GetSynchSchedule, GetSynchSettings, SetSynchSchedule, SetSynchScheduleInfo, SetSynchSettings

Example         Dim objApp As Object

Dim objPref As Object

Dim strSynchScheduleInfo

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Get the property GetSynchScheduleInfo in a string.

strSynchScheduleInfo = objPref.GetSynchScheduleInfo

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

GetSynchSettings Method

Description    Returns the values for the synchronization settings. Returns NULL on error.

Object            Preferences

Syntax            object.GetSynchSettings

Return type   String/BSTR

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The returned string contains the following three fields, separated by a backslash (\):

      SynchReminder\ReminderDays\PurgeFreq

                        SynchReminder      0 (zero) or 1 indicating whether the user is to be reminded to perform synchronization.

ReminderDays       Number of days before displaying reminder (1 to 1000).

PurgeFreq             Number of days after which the transaction log is to be purged (1 to 400).

See also         GetSynchSchedule, SetSynchSchedule, SetSynchSettings

GetSynchUpdateInfo Method (requires ACT! 4.0 or later)

Description    Returns a value that represents the settings for the When Synchronizing options in the Preferences Synchronization tab. Returns S_ERROR on error.

Object            Preferences

Syntax            object.GetSynchUpdateInfo

Return type   Long Integer

GetLastError S_ERROR, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Comments     The following table lists the values that are returned for this property.

Value

Setting

0

Do not Send or Receive Updates

1

Send Updates only

2

Receive Updates only

3

Send and Receive Updates

See also         SetSynchUpdateInfo

NewActivitiesPrivate Property

Description    Gets and sets the public/private preference option for new activities. Use this property to get, select, or deselect the Make New Activities Public option in the Scheduling tab. Returns False on error.

Object            Preferences

Syntax            object.NewActivitiesPrivate [= True|False]

Parameters    True|False              Specify True to make all new activities default to private or False to make them default to public. Omit this optional parameter to get the setting (selected or deselected) of the Make New Activities Public option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets new activities to Public 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Default Activities to Public option (Scheduling tab).

objPreferences.NewActivitiesPrivate = False

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

NewActivitiesSeparate Property (requires ACT! 4.0 or later)

Description    Gets and sets the preference option that specifies if a separate activity should be generated for each contact when scheduling new activities with multiple contacts. Use this property to get, select, or deselect the When Scheduling With Multiple Contacts, Always Create Separate Activities For Each option in the Scheduling tab. If this option is selected, by default a separate activity is created for each contact when a new activity is scheduled for multiple contacts.

Object            Preferences

Syntax            object.NewActivitiesSeparate [= True|False]

Parameters    True|False             Specify True to create a separate activity for each contact by default when an activity is scheduled for multiple contacts. Specify False to create a single activity by default for all selected contacts. Omit this optional parameter to get the setting (selected or deselected) of the When Scheduling With Multiple Contacts, Always Create Separate Activities For Each option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets the When scheduling with multiple contacts,

'always create separate activities for each option.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Deselects the When scheduling with multiple contacts, always create

'separate activities for each option in the Scheduling Tab.

objPreferences.NewActivitiesSeparate False

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

NewContactsPrivate Property

Description    Gets and sets the public/private mode for new contacts. Use this property to get, select, or deselect the Make New Contacts Private option in the Startup tab. If this option is selected, all new activities default to public activities.

Object            Preferences

Syntax            object.NewContactsPrivate [= True|False]

Parameters    True|False              Specify True to make all new contacts private or False to make them public. Omit this optional parameter to get the setting (selected or deselected) of the Make New Contacts Private option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example makes new contacts Public 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Deselect the Make New Contacts Private option (Startup tab).

objPreferences.NewContactsPrivate = False

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

NewGroupsPrivate Property

Description    Gets and sets the public/private mode for new groups. Use this property to get, enable, or disable (that is, select or deselect) the Make New Groups Private option in the Startup tab. If this option is selected, all new activities are public activities.

Object            Preferences

Syntax            object.NewGroupsPrivate [= True|False]

Parameters    True|False              Specify True to make all new groups private or False to make them public. Omit this optional parameter to get the setting (selected or deselected) of the Make New Groups Private option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets new groups to Public 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Deselect the Make New Groups Private (Startup tab)

objPreferences.NewGroupsPrivate = False

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

PromptToPrintEnvelope Property (requires ACT! 4.0 or later)

Description    Gets and sets the mode for the prompt for printing an envelope when printing a letter. Use this property to get, enable, or disable (that is, select or deselect) the When Printing Letters, Prompt To Print An Envelope option in the General tab of the Preferences dialog box. Returns True if the When Printing Letters, Prompt To Print An Envelope option is selected or False if this option is deselected. Returns False on failure.

Object            Preferences

Syntax            object.PromptToPrintEnvelope [= True|False]

Parameters    True|False              Specify True to select the When Printing Letters, Prompt To Print An Envelope option or False to deselect this option. Omit this optional parameter to get the setting (selected or deselected) of the When Printing Letters, Prompt To Print An Envelope option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

Dim strSynchScheduleInfo

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Set the property PromptToPrintEnvelope to True to get the prompt.

objPref.PromptToPrintEnvelope True

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

ReceivedSynchLocation Property (requires ACT! 4.0 or later)

Description    Gets and sets the All Received Synchronizations Go option in the Preferences Synchronization tab. Returns NULL on error. The location is verified to make sure it exists before the property is set.

Object            Preferences

Syntax            object.ReceivedSynchLocation [= szLocation]

Parameters    szLocation             A string that specifies the new location of the folder for received synchronizations to be stored. Omit this optional parameter to get the current location.

Value type      String/BSTR, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

RememberPassword Property

Description    Gets and sets the mode for remembering passwords. Use this property to get, enable, or disable (that is, select or deselect) the Remember Password option in the General tab. If this option is selected, ACT! does not prompt the user for a password.

Object            Preferences

Syntax            object.RememberPassword [= True|False]

Parameters    True|False              Specify True to remember the password or False to prompt the user for a password. Omit this optional parameter to get the setting (selected or deselected) of the Remember Password option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that ACT! remembers the user password 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set the Remember Password option (General tab).

objPreferences.RememberPassword = True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

RemindToBackup Property (requires ACT! 4.0 or later)

Description    Gets and sets the value of the Remind Me To Backup Every n Days option in the General tab of the Preferences dialog box. Returns False on failure.

Object            Preferences

Syntax            object.RemindToBackup [= lDays]

Parameters    lDays                     A long integer representing the number of days for the Remind Me To Backup Every n Days option, in the range from 0 to 365. Specify a value of 0 to deselect this option and disable the reminder. If this parameter is omitted, this property returns the number of days if the Remind Me To Backup Every n Days option is selected or a value of 0 if this option is deselected.

Value type      Long Integer, Read/Write

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         BackupDB and RestoreDB in the Application object

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Set the schedule for backup reminder to 20 days.

objPref.RemindToBackUp 20

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

ReturnReceipt Property (requires ACT! 4.0 or later)

Description    Gets and sets the mode for receiving return receipts from recipients of e-mail messages. Use this property to get, enable, or disable (that is, select or deselect) the Return Receipt option under New Message Settings in the E-mail tab of the Preferences dialog box. Returns True if the Return Receipt option is selected or False if this option is deselected. Returns False on failure.

Object            Preferences

Syntax            object.ReturnReceipt [= True|False]

Parameters    True|False              Specify True to select the Return Receipt option or False to deselect it. Omit this optional parameter to get the setting (selected or deselected) of the Return Receipt option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB  C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Select the return receipt option.

objPref.ReturnReceipt True

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

SecondGroupColumn Property

Description    Gets and sets the name of the second column in the Group view. Returns NULL on error.

Object            Preferences

Syntax            object.SecondGroupColumn [= szClName]

Parameters    szClName               A string that specifies the name of the second column to be displayed in the Group view. Omit this optional parameter to get the name of the second column.

Value type      String/BSTR, Read/Write

GetLastError S_CON_DOC, S_INVALID_INPUT, S_NO_DB, S_NO_SCHEMA, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example sets City as the second column in the Group 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select City in the Second Group Column combo box (Startup tab).

objPreferences.SecondGroupColumn "City"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetActivityCleanupStyle Method

Description    Sets a value representing the style of representing cleared activities. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetActivityCleanupStyle(iStyle)

Parameters    iStyle                      A short integer representing the style for cleared activities. Specify 0 to gray cleared activities or 1 to strike out cleared activities.

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetActivityCleanupStyle

Example         'This example specifies that cleared activities should be grayed 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Gray option in the When Clearing Activities

'group box (Scheduling tab).

objPreferences.SetActivityCleanupStyle 0

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetAttachmentInfo Method (requires ACT! 4.0 or later)

Description    Sets values representing the settings for the Attaching Messages To Contacts options in the Preferences E‑mail tab. Returns S_ERROR on error.

Object            Preferences

Syntax            object.SetAttachmentInfo(szNewInfo)

Parameters    szNewInfo              The following fields are specified in szNewInfo in order and separated by a backslash (\)

AttachMode\Folder

                              AttachMode:

The following table lists the values for the AttachMode field.

Value

Setting

0

Ask me (the user) before saving the attached file.

1

Always save the attached file.

2

Never save the attached file.

                                                      Folder:

                              Contains the location of the folder specified in the Messages You Have Attached To Contacts Are Stored In option. An error is returned if the specified folder does not exist.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetAttachInfo

Example         'This example selects the Always save the attached file option for

'When attaching messages with file attachments and the folder name

'in E-mail preferences.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Selects the Always save the attached file option and

'the Folder name as c:\Email.

objPreferences.SetAttachmentInfo "1\c:\Email"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetCalendarIncrements Method

Description    Sets values representing the settings of calendar increments for the daily or weekly calendar. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetCalendarIncrements(iType, iIncrement)

Parameters    iType                      A short integer representing the calendar.

The following table lists the values for iType.

Value

Setting

301

Weekly calendar

302

Daily calendar

                        iIncrement              A short integer representing the increment in minutes. iIncrement can be 5, 10, 15, 30, 45, or 60. Any other value is converted to 5.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetCalendarIncrements

Example         'This example sets weekly calendar increments 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set weekly calendar increments to 1 hour (Calendars tab).

objPreferences.SetCalendarIncrements 301, 60

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetDataToSynch Method (requires ACT! 4.0 or later)

Description    Sets a value that selects or deselects the Data To Synchronize options in the Preferences Synchronization tab. Returns S_ERROR on error.

Object            Preferences

Syntax            object.SetDataToSynch(lInfo)

Parameters    lInfo                       A long integer in the range from 0 to 3 that represents the settings for the Data To Synchronize options in the Preferences Synchronization tab.

                              The following table lists the values for this parameter.

Value

Setting

0

Do not Synchronize Activities or Notes/Histories

1

Synchronize Activities only

2

Synchronize Notes/Histories only

3

Synchronize Activities and Notes/Histories

Return type   Long Integer

GetLastError S_ERROR, S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         GetDataToSynch

Example         'This example selects only the Notes/Histories option for Data to

'synchronize in Synchronization preferences.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Checks the Notes/History checkbox in the Data to be Synchronized.

objPreferences.SetDataToSynch 2

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetDBMaintReminderInfo Method (requires ACT! 2000 or later)

Description    Sets the values for the database maintenance reminder.

Object            Preferences

Syntax            object.SetDBMaintReminderInfo (True|False, lDayInterval)

Parameters    True|False              Specify True to select the database maintenance reminder setting or False to deselect the setting.

lDayInterval          A long integer specifying the value (in days) for the database maintenance reminder, in a range between 1 and 365. This value is not validated if True|False is set to False.

Return type   Void

See also         GetDBMaintReminderInfo

Example         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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set the database maintenance reminder to be set on for every 15 days.

objPreferences.SetDBMaintReminderInfo True, 15

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetDefaultApplication Method

Description    Sets the default application to be used for the specified type. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetDefaultApplication(iType, szAppName)

Parameters    iType                      A short integer representing the type of application.

The following table lists the values for this parameter. Specify 0 to set the default word processor or 1 or to set the default fax software.

                        szAppName            A string representing the name of the application, such as "ACT! Word Processor" or "Microsoft Word 95 – 2000."

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_FAX_DRIVER, S_NO_FAX_DRVMGR, S_NO_SECURITY, S_NO_USER, S_NO_WP_DRIVER, S_NO_WP_DRVMGR, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         GetDefaultApplication

Example         'This example specifies that the default word processor is the

'ACT! word processor 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the ACT! Word Processor in the Word Processor list in the

'Default Applications group box (General tab).

objPreferences.SetDefaultApplication 1, "ACT! Word Processor"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetDefaultLocation Method

Description    Sets the default directory location for the specified file type. Returns S_ERROR if the specified file does not exist.

Object            Preferences

Syntax            object.SetDefaultLocation(iType, szLocation)

Parameters    iType                      A short integer representing the file type.

The following table lists the values for this parameter.

Value

Setting

 

Value

Setting

0

Database

 

6

Layout

1

Document

 

7

Macro

2

Document template

 

8

Briefcase

3

Report, label, envelope

 

9

Outbox

4

Synchronize

 

10

Spelling dictionary

5

Query

 

12

NetLinks (requires ACT! 4.0 or later)

                        szLocation             A string representing the default location of the files of iType type.

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_FOUND, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetDefaultLocation

Example         'This example 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:\My Documents\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 2, "c:\My Documents"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetEmailInboxSettings Method

Description    Sets the E-mail Inbox Settings options.

Object            Preferences

Syntax            object.SetEmailInboxSettings(iDelete, iPollTime)

Parameters    iDelete                   A short integer specifying the setting of the Confirm When Deleting Message(s) option in the E-mail tab for preferences. Specify a value of 1 to select this option or 0 (zero) to deselect it.

iPollTime                A short integer in the range between 0 (zero) and 60 specifying the setting of the When Connected Notify Me Of New Mail Every xx Minutes option in the E-mail tab for preferences. A value greater than 0 (zero) indicates the number of minutes; a value of 0 (zero) indicates that the option is deselected.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetEmailInboxSettings

Example         'This example specifies e-mail settings 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Confirm When Deleting Message(s) option and the Notify Me

'of New E-mail option and set it to 5 minutes (E-mail tab).

objPreferences.SetEmailInboxSettings 1, 5

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetEmailNewMsgInfo Method

Description    Sets the signature text and the mode of creating a history record when sending a new e‑mail message. Use this property to set the Signature Text and the setting of the Create History When Sent option under New Message Settings in the E-mail tab of the Preferences dialog box. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetEmailNewMsgInfo(szInfo)

Parameters    szInfo                     A string containing the information.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Comments     The string contains the following two fields, separated by a backslash (\):

CreateHist\SigText

CreateHist specifies the setting of the Create History When Sent option. Specify 1 to select this option or 0 (zero) to deselect it.

SigText specifies Signature Text for a new message.

See also         GetEmailNewMsgInfo

Example         'This example specifies new e-mail settings 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Create History When Sent option in the New Message Settings

'group box (E-mail tab). Display "Chris Huffman " as the signature text.

objPreferences.SetEmailNewMsgInfo "1\Chris Huffman "

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetEmailSystem Method (requires ACT! 4.0 or later)

Description    Sets the current E-mail system. Returns S_ERROR on failure or if the specified system is not available.

Object            Preferences

Syntax            object.SetEmailSystem (szSystem)

Parameters    szSystem           A string that specifies the name of the mail system.

Return type   Long Integer

GetLastError S_NO_EMAIL, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetEmailSystem

Example         'This example sets cc:Mail as the current E-mail system in

'E-mail preferences

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Sets the Email-System to send email to Contacts as cc:Mail

'in the Preferences dialog box in the ACT! application

objPreferences.SetEmailSystem "cc:Mail"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetNameSettings Method

Description    Sets first-name prefixes, last-name prefixes, or last-name suffixes. The prefixes or suffixes specified with this method completely overwrite any existing prefixes or suffixes (displayed in the list box of the Names tab of the Preferences dialog box). Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetNameSettings(iType, szList)

Parameters    iType                      A short integer indicating the type of prefix or suffix being specified.

The following table lists the values for this parameter.

Value

Setting

 

Value

Setting

1

First-name prefixes

 

3

Last-name suffixes

2

Last-name prefixes

 

 

 

                        szList                      A string containing the prefixes or suffixes, separated by commas.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetNameSettings

Example         'This example specifies three first-name prefixes, overwriting

'any existing first-name prefixes in the file.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

objPreferences.SetNameSettings 1, "Col., Lt., Maj."

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetSchdActivityDefaults Method

Description    Sets the scheduling preferences default options. Returns S_ERROR on failure.

Note: Scheduling popup field preferences require ACT! 4.0 or later.

Object            Preferences

Syntax            object.SetSchdActivityDefaults(iType, szDefaults)

Parameters    iType                      A short integer representing the activity type whose defaults are to be set.

The following table lists the values for this parameter.

Value

Setting

 

Value

Setting

0

Calls

 

2

To-do’s

1

Meetings

 

 

 

                        szDefaults              A string containing the default values for the fields. The following fields are specified in szDefaults in order and separated by a backslash (\) for the specified type of activity:

Priority\AlarmLeadTime\Duration\DefaultToTimeless\SetAlarm\
PopupFields

                              Priority:

The following table lists the values for this field.

Value

Setting

 

Value

Setting

0

High

 

2

Low

1

Medium

 

 

 

                                                      AlarmLeadTime:

The following table lists the values for this field.

Value

Setting

 

Value

Setting

0

0 minutes

 

7

2 hours

1

5 minutes

 

8

3 hours

2

10 minutes

 

9

8 hours

3

15 minutes

 

10

1 day

4

30 minutes

 

11

5 days

5

45 minutes

 

12

30 days

6

1 hour

 

 

 

                                                      Duration:

The following table lists the values for this field.

Value

Setting

 

Value

Setting

0

0 minutes

 

7

2 hours

1

5 minutes

 

8

3 hours

2

10 minutes

 

9

8 hours

3

15 minutes

 

10

1 day

4

30 minutes

 

11

5 days

5

45 minutes

 

12

30 days

6

1 hour

 

 

 

                                                      DefaultToTimeless:

                              DefaultToTimeless represents the setting of the Default To Timeless option. Specify a value of 1 to select this option or a value of 0 (zero) to deselect it.

                                                      SetAlarm:

SetAlarm represents the setting of the Set Alarm option. Specify a value of 1 to select this option or a value of 0 (zero) to deselect it.

                                                      PopupFields:

A value in a range from 0 to 31 that represents which fields are displayed in the Schedule Activity dialog box. Popup field preferences are provided only in ACT! 4.0 or later.

PopupFields is created by ORing the values in the following table.

Value

Setting

 

Value

Setting

1

Date

 

8

Regarding

2

Time

 

16

Alarm Lead Time

4

Duration

 

 

 

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetSchdActivityDefaults

Example         'This example specifies default settings for to-do’s 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'For to-do’s, select: Priority Low, Alarm Lead Time 30 minutes,

'Duration 30 minutes, deselect the Default to Timeless option, and

'select the Set Alarm option (Scheduling tab).

Dim sPop As String

sPop = Trim(str(4 Or 16))

'The Duration and Lead Time options should be selected.

objPreferences.SetSchdActivityDefaults(2, "2\4\4\2\1\" & sPop)

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetSchdAutoRollover Method

Description    Sets the automatic rollover options. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.SetSchdAutoRollover(iRollover)

Parameters    iRollover                A short integer indicating the rollover settings for calls, meetings, and to-do’s.

                              iRollover is created by ORing the values in the following table for calls, meetings, and to-do’s.

Value

Setting

 

Value

Setting

1

Calls

 

4

To-do’s

2

Meetings

 

 

 

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetSchdAutoRollover

Example         'This example specifies that calls and to-do’s should be rolled over 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Calls and To-do’s options in the

'Automatically Roll Over group box (Scheduling tab)

objPreferences.SetSchdAutoRollover 1 Or 4

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetStyle Method

Description    Sets the name of the font to be used for the specified window.

Object            Preferences

Syntax            object.SetStyle(iWindowType, szFontName)

Parameters    iWindowType         A short integer representing the window type.

The following table lists the values for this parameter.

Value

Setting

 

Value

Setting

0

Contact List

 

5

Weekly calendar

1

Notes/History tab

 

6

Monthly calendar

2

Activities tab

 

7

E-mail

3

Task List

 

8

Contacts tab

4

Daily calendar

 

9

Groups view

                        szFontName           A string indicating the name of the font to be used for the window.

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetStyle

Example         'This example specifies the font to be used in the Task List 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select MS Serif for the Contact List font (Colors and Fonts tab).

objPreferences.SetStyle 0, "MS Serif"

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

SetSynchSchedule Method (obsolete)

Use SetSyncScheduleInfo instead of this method.

SetSynchScheduleInfo Method (requires ACT! 4.0 or later)

Description    Sets values for the automatic synchronization schedule. Returns S_ERROR on error.

Note: Use this method instead of SetSynchSchedule in ACT! 4.0 or later.

Object            Preferences

Syntax            object.SetSynchScheduleInfo(szInfo)

Parameters    szInfo                     A string representing the information.

The string contains the following two fields, separated by a backslash (\):

SynchDays\SynchTime

                                                      SynchDays:

A value between 0 and 128 representing the days of the week synchronization is to be performed. The value must be ANDed with specific defines representing the week bit set.

Use the following values for days of a week:

Value

Day of week

 

Value

Day of week

1

Sunday

 

16

Thursday

2

Monday

 

32

Friday

4

Tuesday

 

64

Saturday

8

Wednesday

 

 

 

                                                      SynchTime:

Synchronization time(s) in Windows Regional Settings Time style (hh:mm AM|PM) format. Specify synchronization times in the following format:

\SynchTime\SynchTime\SynchTime...

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         GetSynchScheduleInfo, GetSynchSettings, SetSynchSettings

Example         Set objPref = objApp.Preferences

 

'Set the synchronization schedule as Sunday, Thursday, and Friday,

'at 10:15 AM, 2:30 PM, and 4:45 PM.

Dim days As Integer

days = 1 Or 16 Or 32

objPref.SetSynchScheduleInfo days & "\10:15 AM\2:30 PM\4:45 PM"

 

Set objPref = Nothing

SetSynchSettings Method

Description    Sets the values for the synchronization settings. Returns S_ERROR on error.

Object            Preferences

Syntax            object.SetSynchSettings(szInfo)

Parameters    szInfo                     A string containing the synchronization settings.

Return type   Long Integer

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Comments     szInfo must be a string containing the following three fields, separated by a backslash (\):

SynchReminder\ReminderDays\PurgeFreq

                        SynchReminder      0 (zero) or 1 representing whether the user is to be reminded to perform synchronization.

ReminderDays       Number of days before displaying reminder (1 to 1000).

PurgeFreq             Number of days after which the transaction log is to be purged (1 to 400).

See also         GetSynchSchedule, GetSynchSettings, SetSynchSchedule.

SetSynchUpdateInfo Method (requires ACT! 4.0 or later)

Description    Sets a value that selects or deselects the When Synchronizing options in the Preferences Synchronization tab. Returns S_ERROR on error.

Object            Preferences

Syntax            object.SetSynchUpdateInfo(lInfo)

Parameters    lInfo                       A long integer in the range from 0 to 3 that represents the settings for the Send Updates and Receive Updates options in the Preferences Synchronization tab.

                              The following table lists the values for this parameter.

Value

Setting

0

Do not Send or Receive Updates

1

Send Updates only

2

Receive Updates only

3

Send and Receive Updates

Return type   Long Integer

GetLastError S_INVALID_INPUT, S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

See also         GetSynchUpdateInfo

Example         'This example selects only the Send Updates option for When synchronizing

'in Synchronization preferences.

 

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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Checks the Send Updates Only checkbox in When Synchronizing.

objPreferences.SetSynchUpdateInfo 1

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

ShowContactParsingDialog Property (requires ACT! 2000 or later)

Description    Automatically shows the contact name definition dialog if the contact name contains more than two names (Chester Van Houten, for example). Returns 0 if the preference is successfully set or an error code if unsuccessful. For a list of error codes, see the following chapter.

Object            Preferences

Syntax            object.ShowContactParsingDialog (= True|False)

Parameters    = True|False          Specify True to show the dialog or False to not show it.

Value type      Long Integer

Example         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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Set the preferences to Show Contact Name Parsing dialog

objPreferences.ShowContactParsingDialog True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

ShowCurrentMonthOnly Property

Description    Gets and sets the mode for displaying the Mini-Calendar. Use this property to get, enable, or disable (that is, select or deselect) the When Displaying Mini-Calendar, Show Only Current Month option in the Calendars tab. If this option is selected, ACT! displays only one month, instead of three, in the Mini-Calendar.

Object            Preferences

Syntax            object.ShowCurrentMonthOnly [= True|False]

Parameters    True|False             Specify True to display only one month in the Mini-Calendar or False to display three months. Omit this optional parameter to get the setting (selected or deselected) of the When Displaying Mini-Calendar, Show Only Current Month option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that only the current month should be

'displayed in the Mini-Calendar 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the When Displaying Mini-Calendar, Show Only Current Month

'option (Calendars tab).

objPreferences.ShowCurrentMonthOnly True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

StartupDatabase Property

Description    Gets and sets the name of the database that opens when ACT! is started. The database must exist when this property is used. This property is effective only if UseLastDBonStartup is set to False.

Object            Preferences

Syntax            object.StartupDatabase [= szDBName]

Parameters    szDBName             A string that specifies the database to be opened when ACT! is started. Omit this optional parameter to get the name of the database.

Value type      String/BSTR, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_FOUND, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         UseLastDBonStartup, StartupMacro

Example         'This example specifies the startup database 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'C:\My Documents\ACT\Database\ACT5demo.dbf

'is the startup database (Startup tab).

objPreferences.StartupDatabase = C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

StartupMacro Property

Description    Gets and sets the full path and file name of a file containing a macro that ACT! executes at startup. The macro file must exist when this property is used.

Object            Preferences

Syntax            object.StartupMacro [= szMacroName]

Parameters    szMacroName        A string that specifies the macro file name to be executed when ACT! is started. Omit this optional parameter to get the name of the macro.

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_FOUND, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Value type      String/BSTR, Read/Write

TabNavigation Property

Description    Gets and sets the key used to move between fields.

Object            Preferences

Syntax            object.TabNavigation [= True|False]

Parameters    True|False              Specify True to use the Tab key to move between fields or False to use the Enter key. Omit this optional parameter to get the key used to move between fields.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that the Tab key is used to move between fields

'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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Tab Key option in the Move Between Fields Using

'group box (General tab).

objPreferences.TabNavigation = True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

UseAct20Keys Property

Description    Gets and sets the mode of the Move Between Records Using ACT! 2.0 Shortcut Keys option. Use this property to get, select, or deselect (that is, enable or disable) this option in the General tab of the Preferences dialog box.

Object            Preferences

Syntax            object.UseAct20Keys [= True|False]

Parameters    True|False              Specify True to use ACT! 2.0 shortcut keys to move between records or False to use ACT! 2000 shortcut keys. Omit this optional parameter to get the setting (selected or deselected) of the Move Between Records Using ACT! 2.0 Shortcut Keys option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

Example         'This example specifies that ACT!2.0 shortcut keys are used 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'Select the Move Between Records Using Act2.0 Shortcut Keys

'option (General tab).

objPreferences.UseAct20Keys = True

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

UseDialer Property (not currently implemented)

Description    Gets and sets the mode of the Use Dialer option. Use this property to get, select, or deselect (that is, enable or disable) this option in the Dialer tab of the Preferences dialog box.

Object            Preferences

Syntax            object.UseDialer [= True|False]

Parameters    True|False              Specify True to select the Use Dialer option or False to deselect it. Omit this optional parameter to get the setting (selected or deselected) of the Use Dialer option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

UseLastDBonStartup Property

Description    Gets and sets the mode of the Startup Database. Use this property to get or select the Last Opened or Named Database option in the Startup tab of the Preferences dialog box. Indicates whether ACT! starts up with the last opened database.

Object            Preferences

Syntax            object.UseLastDBonStartup [= True|False]

Parameters    True|False              Specify True to select the Last Opened option or False to select the Named Database option. If this parameter is omitted, returns True if the Last Opened option is selected or False if the Named Database option is selected.

Note: If you set this property to False, use StartupDatabase to specify the path and name of the startup database.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND, S_WRITE_FAIL

See also         StartupDatabase

Example         'This example specifies that the last opened database is not used

'at startup 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Set the Preferences object.

Set objPreferences = objApp.Preferences

 

'In the Startup Database group box, deselect the

'Last Opened option (Startup tab).

objPreferences.UseLastDBonStartup = False

 

'Close the application.

Set objPreferences = Nothing

Set objApp = Nothing

UseTypeahead Property (requires ACT! 4.0 or later)

Description    Gets and sets the typeahead mode for entering e-mail message recipients. Use this property to get, select, or deselect (that is, enable or disable) the Use Typeahead For Entering Recipients option in the E-mail tab of the Preferences dialog box. Returns True if the Use Typeahead For Entering Recipients option is selected or False if this option is deselected. Returns False on failure.

Object            Preferences

Syntax            object.UseTypeahead [= True|False]

Parameters    True|False              Specify True to select the Use Typeahead For Entering Recipients option or False to deselect it. Omit this optional parameter to get the setting (selected or deselected) of the Use Typeahead For Entering Recipients option.

Value type      Boolean, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Select the typeahead option.

objPref.UseTypeahead True

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing

WaitTime Property (requires ACT! 4.0 or later)

Description    Gets and sets the value that represents the time to wait for calls to receive synchronization updates by modem. Use this property to get and set the value of the Wait For option in the Synchronization tab of the Preferences dialog box. Returns S_ERROR on failure.

Object            Preferences

Syntax            object.WaitTime [= lMinutes]

Parameters    lMinutes                 A long integer representing the number of minutes for the Wait For option. Omit this optional parameter to get the setting for the number of minutes.

                              The following table lists the values that are set or returned by this property.

Value

Setting

 

Value

Setting

0

Forever

 

120

2 hours

5

5 minutes

 

180

3 hours

10

10 minutes

 

360

6 hours

15

15 minutes

 

480

8 hours

30

30 minutes

 

600

10 hours

45

45 minutes

 

720

12 hours

60

1 hour

 

 

 

Value type      Long Integer, Read/Write

GetLastError S_NO_SECURITY, S_NO_USER, S_NOT_PRIVILEGED, S_PROPS_NOT_FOUND

Example         Dim objApp As Object

Dim objPref As Object

 

'Open the database with the default database.

Set objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open a database.

objApp.OpenDB C:\My Documents\ACT\Database\ACT5demo.dbf

 

'Get the Preferences object from the Application object.

Set objPref = objApp.Preferences

 

'Set the wait time option to 6 hours.

objPref.WaitTime 360

 

'Close the Preferences object.

Set objPref = Nothing

'Close the Application object.

Set objApp = Nothing


TaskListView object methods

The TaskListView object provides an interface to use the Task List view in the ACT! application. The following methods apply only to the TaskListView object. See “Common properties and methods” for properties and additional methods that apply to the TaskListView object.

Method

Method name

Parameter(s)

Parameter type(s)

Return type

AddNewActivityEx

szContactID…,
szDateTime,
iType,
iTimeless,
szRegarding,
lDuration

String,
String,
Short Integer,
Short Integer,
String,
Long Integer

String/BSTR

GetGrid

None

¾

Object/LPDISPATCH

AddNewActivity Method (obsolete)

Use AddNewActivityEx instead of this method.

AddNewActivityEx Method (requires ACT! 4.0 or later)

Description    Adds a new activity for the specified contact to the grid in the Task List view. Activity defaults set in the Scheduling tab of the Preferences dialog box are used to create the new activity. Use GetFilter and SetFilter in the Grid object before using this method. Returns S_ERROR on failure.

Object            TaskListView

Syntax            object.AddNewActivityEx(szContactID…, szDateTime, iType, iTimeless, szRegarding,
            lDuration
)

Parameters    szContactID           A string representing the Unique ID(s) of contacts with which the new activity will be associated. If a NULL value is specified for this required parameter, the new activity will be associated with the default of the current database user.

Note: Specify multiple Unique IDs as a continuous string of 12‑character values, with no delimiters between the Unique ID values.

szDateTime            A string representing the starting date and time of the activity, formatted in Windows Regional Settings Short Date style and Time style.

iType                      A short integer indicating the type of activity to be added.

lType must be one of the following values:

Value

Activity type

 

Value

Activity type

0

Call

 

2

To-do

1

Meeting

 

 

 

 

iTimeless                A short integer indicating the timeless status of the activity to be added. Specify 0 for not timeless or 1 for timeless.

szRegarding           A string representing the description of the activity.

lDuration               A long integer representing the duration in minutes for the activity.

Return type   String/BSTR

GetLastError S_ACTIVITY_INIT_FAIL, S_CON_DOC, S_EEDIT_FAIL, S_INVALID_INPUT, S_MEM_ERROR, S_NO_DALLIST_VIEW, S_PROPS_NOT_FOUND

Comments     If any Unique ID specified in szContactID is invalid, this method returns S_OK. GetLastError returns S_INVALID_INPUT.

Return type   Long Integer

Example         'This example adds an activity through the Task List.

 

'Create the TaskListView object.

Set objTask = objViews.Create(4, "TL")

'Get the Grid object.

Set objTaskGrid = objTask.GetGrid

List1.AddItem objTaskGrid.GetCurrentRow

 

List1.AddItem "There are " & objTaskGrid.GetRowCount & " Activities"

 

Dim x As Long

Dim y, z As Variant

'Get the filter values.

objTaskGrid.GetFilter x, y, z

j = 0 Or 1 Or 2 Or 8 Or 4 Or 64 Or 128 Or 16 Or 32

'Set filter to select all priorities, all types, cleared activities,

'all users, and all dates.

objTaskGrid.SetFilter j, 1, ""

'Add a new activity.

uid = objTask.AddNewActivityEx(sContact, "1/31/98 8:29PM",

   activitytype_meeting, 0, "Test ABC", "15")

RN = objTaskGrid.GetRowNumber(uid)

'Set the activity priority.

objTaskGrid.SetField AF_Priority, RN, activitypriority_medium

 

'Reset the filter back to what the user had selected.

objTaskGrid.SetFilter x, y, z

 

objTaskGrid.Close

Set objTaskGrid = Nothing

 

Set objViews = Nothing

GetGrid Method

Description    Returns a dispatch pointer to a grid object for the Task List view.

Object            TaskListView

Syntax            object.GetGrid

Return type   Object/LPDISPATCH

GetLastError S_CON_DOC

Example         See GetColumnCount (Grid object).

Views object property and methods

The following property and methods apply only to the Views object.

Property

Property name

Parameter(s)

Parameter type(s)

Value type

Access

Count

None

¾

Short Integer

Read Only

Methods

Method name

Parameter(s)

Parameter type(s)

Return type

Application

None

¾

Object/LPDISPATCH

ClearError

None

¾

Void

CloseAll

None

¾

Long Integer

Create

iViewType,
szName

Short Integer, String

Object/LPDISPATCH

CreateBrowserView

szCtrlFile

String

Object/LPDISPATCH

CreateBrowserViewFromUrl

szCtrlFile
szTitle
iFlags

String,
String,
Short Integer

 

CreateEx

iViewType,
iState

Short Integer, Short Integer

Long Integer

FindExplorerView

szName,
iViewType

String,
Short Integer

Object/LPDISPATCH

GetActive

None

¾

Object/LPDISPATCH

GetLastError

None

¾

Long Integer

GetView

iViewType

Short Integer

Object/LPDISPATCH

GetViewEx

True|False,
iViewType

Boolean
Short Integer

Object/LPDISPATCH

Application Method

Description    Returns a dispatch pointer to the application object containing the Views object.

Object            Views

Syntax            object.Application

Return type   Object/LPDISPATCH

Example         'The following code can be put into a function that has been passed

'only the Views object – objViews. We assume in the main function

'that the Application object has already been created.

 

Dim objApp1 as object

'Get a pointer to the Application object.

Set objApp1 = objViews.Application

'Any Application object methods can manipulate the application.

'End the function.

Set objApp1 = Nothing

ClearError Method (requires ACT! 4.0 or later)

Description    Clears the last error.

Object            Views

Syntax            object.ClearError

Return type   Void

See also         GetLastError

CloseAll Method

Description    Closes all open views and the database. This method is the same as the CloseDB method and is equivalent to selecting Close from the File menu in the application. Returns S_ERROR on failure.

Object            Views

Syntax            object.CloseAll

Return type   Long Integer

Count Property

Description    Returns the number of existing views (including any added Explorer views) in the application.

Object            Views

Syntax            object.Count

Value type      Short Integer, Read Only

GetLastError S_NO_OPENDB

Create Method

Description    Creates a view of the specified type. Only one view of a given type can be created. Returns a dispatch pointer to the newly-created view object if successful or NULL if unsuccessful.

Object            Views

Syntax            object.Create(iViewType, szName)

Parameters    iViewType              A short integer indicating the type of view to be created.

The following table lists the values for this parameter.

Value

View type

 

Value

View type

1

Contacts view

 

4

Task List view

2

Contact List view

 

5

Calendar view

3

Groups view

 

6

E-mail view (To create an E-mail view, the E-mail system must have been set up in the ACT! application.)

                        szName                  A string representing the name of the view. szName is ignored except if the type is Explorer view. Explorer views are identified by their name. (Currently ignored.)

Return type   Object/LPDISPATCH

GetLastError S_INVALID_VWTYPE, S_NO_EMAIL_SYSTEM, S_NO_OPENDB, S_VIEW_EXISTS

See also         GetView
Activate, Show in “Common properties and methods”

Example         'This example creates a Views object.

 

Dim objApp as object

Dim objViews as object

Dim objTask 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:\My Documents\ACT\Database\ACT5demo.dbf

 

'Create a Views object.

Set objViews = App.Views

 

'Create the TaskListView object. This brings up the Task List view.

Set objTask = objViews.Create(4, "MyTaskList")

 

'Close the Task List.

objTask.Close

Set objTask = Nothing

objViews.CloseAll

Set objViews = Nothing

'Close the Application object.

Set objApp = Nothing

CreateBrowserView Method (requires ACT! 2000 version 5.0.2 or later)

Description    Creates and opens an Internet browser view by loading the specified control file. Returns a dispatch pointer to the newly-created view object if successful or NULL if unsuccessful.

Note: Assign a View Bar button or menu item to an Internet view to automatically create it when ACT! starts. See the Adding Extensible Views and Tabs to ACT! section of the ACT! Software Development Kit (SDK) for more information.

Object            Views

Syntax            object.CreateBrowserView (szCtrlFile)

Parameters    szCtrlFile               A string specifying the name and optionally the path of the control file that defines the view. See the Adding Extensible Views and Tabs to ACT! section of the ACT! Software Development Kit (SDK) for information about creating a control file.

Note: Control files with a .CTL extension in the \NetLinks folder are automatically loaded when ACT! starts. If you do not want to load a control file at startup, add it to a different folder such as the ACT! program files folder, or give it a different extension. Then this method will load the control file.

Return type   Object/LPDISPATCH

GetLastError S_SERVER_BUSY, S_NO_OPENDB, S_NOT_FOUND

See also         CreateBrowserViewFromUrl, GetView
Activate, Show in Common properties and methods

CreateBrowserViewFromUrl Method (requires ACT! 2000 version 5.0.2 or later)

Description    Creates and opens an Internet browser view and loads the specified URL into the view. Returns a dispatch pointer to the newly-created view object if successful or NULL if unsuccessful.

Object            Views

Syntax            object.CreateBrowserViewFromUrl (szCtrlFile, szTitle, iFlags)

Parameters    szCtrlFile               A string specifying the starting URL to load into the new Internet browser view.

szTitle                    A string specifying the title of the Internet browser view. The title appears in the title bar of the ACT! window and in the ACT! Window menu. Specify a null value for this parameter to use the title of the current Web page as the ACT! Window title.

iFlags                    A short integer specifying the behavior of the Internet browser view. Specify 0 to display the default toolbar or 1 for no default toolbar.

Return type   Object/LPDISPATCH

GetLastError S_SERVER_BUSY, S_MEM_ERROR, S_LIST_ERR

See also         CreateBrowserView, GetView
Activate, Show in “Common properties and methods”

CreateEx Method (requires ACT! 2000 or later)

Description    Creates a view of the specified type in a specified window state. Only one view of a given type can be created. Returns a dispatch pointer to the newly-created view object if successful or NULL if unsuccessful.

Object            Views

Syntax            object.CreateEx (iViewType, iState)

Parameters    iViewType              A short integer representing the type of view to be created.

The following table lists the values for this parameter.

Value

View type

 

Value

View type

1

Contacts view

 

4

Task List view

2

Contact List view

 

5

Calendar view

3

Groups view

 

6

E-mail view (To create an E-mail view, the E-mail system must have been set up in the ACT! application.)

 

iState                     A short integer indicating the state of the window in which the view will be created.

The following table lists the values for this parameter.

Value

View State

 

Value

View State

1

Normal

 

3

Minimized

2

Maximized

 

4

Hidden

Return type   Long Integer

See also         ViewState in “Common properties and methods”

Example         'The following sample opens the Contact View in Maximized state

 

Set objViews = objApp.Views

'Open the ContactView in Maximized state

Set objContactView = objViews.CreateEx(1,"CV" , 2)

FindExplorerView Method (requires ACT! 4.0 or later)

Description    Returns a dispatch pointer to the Explorer view with the specified name. This method is used only for Explorer views. Returns NULL if a view with the specified name does not exist.

Note: This method requires an Explorer view that was added using the Adding Extensible Views and Tabs to ACT! component of the ACT! SDK.

Object            Views

Syntax            object.FindExplorerView(szName, iViewType)

Parameters    szName                  A string representing the name of the Explorer view whose dispatch pointer is to be retrieved.

iViewType              A short integer representing the type of Explorer view.

                              The following table lists the values for this parameter.

Value

View type

 

Value

View type

7

Floating view

 

101

Group tab view

100

Contact tab view

 

 

 

Return type   Object/LPDISPATCH

GetLastError S_NO_OPEN_DB, S-NOT_FOUND, S_SERVER_BUSY, S_VW-NOT-FOUND

See also         GetActive, GetView

GetActive Method

Description    Returns a dispatch pointer to the view currently active view object. Returns NULL on error.

Object            Views

Syntax            object.GetActive

Return type   Object/LPDISPATCH

GetLastError S_VW_NOT_FOUND

See also         Activate, Type in “Common properties and methods”

Example         'This example assumes that the coder has only the

'Views object. (There is an active view.)

'The Case statement gets the view type and depending on that the

'user can add more methods. We assume that the particular view

'has been created using the Create function.

 

Dim objView as object

 

'Set the objView pointer to the active view.

Set objView = objViews.GetActive

 

'Find out which window is active for further operations.

Select Case objView.Type

Case 1

'The active view is the Contacts view

'Add ContactView methods

Case 2

'The active view is the Contact List view

'Add ContactListView methods

Case 3

'The active view is the Groups view

'Add GroupView methods

Case 4

'The active window is the Task List view

'Add TaskListView methods

Case 5

'The active window is the Calendar view

'Add CalendarView methods

Case 6

'The active window is the Email view.

'Add EmailView object methods.

End Select

 

'End the function.

Set objView = Nothing

GetLastError Method

Description    Returns a long integer representing the last error code for the object. For a list of error codes, see the following chapter.

Object            Views

Syntax            object.GetLastError

Return type   Long Integer

See also         ClearError

GetView Method

Description    Returns a dispatch pointer to an existing view of the specified type, except Explorer views. Returns NULL if no view of the specified type exists. If the view does not exist, call the Create method to create the view before calling this method.

Object            Views

Syntax            object.GetView(iViewType)

Parameters    iViewType              A short integer representing the type of the view whose dispatch pointer is to be retrieved.

The following table lists the values for this parameter.

Value

View type

 

Value

View type

1

Contacts view

 

4

Task List view

2

Contact List view

 

5

Calendar view

3

Groups view

 

6

E-mail view (To create an E-mail view, the E-mail system must have been set up in the ACT! application.)

Return type   Object/LPDISPATCH

See also         Create, FindExplorerView

GetLastError S_INVALID_INPUT, S_NO_OPENDB, S_VW_NOT_FOUND

Example         'The following code can be put into a function that has been passed

'only the Views Object – objViews. We assume in the main function

'that the Group view and Task view have already been created.

 

Dim objGrp1 as object

Dim objTask1 as object

 

'Get the GroupView pointer.

Set objGrp1 = objViews.GetView(3)

 

'Now any GroupView methods can be applied to manipulate the Group view

 

'Get the pointer to the TaskListView.

Set objTask1 = objViews.GetView(4)

 

'TaskListView methods can be applied to manipulate the Task List view.

 

'End the function.

Set objGrp1 = Nothing

Set objTask1 = Nothing

GetViewEx Method (requires ACT! 2000 version 5.0.2 or later)

Description    Returns a dispatch pointer to an existing view of the specified type, except Explorer views, and optionally retain the current state of the view or make it active. Returns NULL if no view of the specified type exists. If the view does not exist, call the Create or CreateEx method to create the view before calling this method.

Note: If you obtain the dispatch pointer of a view silently (preserve the current active or hidden state of the view), calling other methods of the returned dispatch pointer may switch to the view in the ACT! application.

Object            Views

Syntax            object.GetViewEx(True|False, iViewType)

Parameters    True|False              Specify True to retrieve a dispatch pointer to an existing view silently by retaining the current state of the view (active or hidden) or False to display the view and make it the current view.

iViewType              A short integer representing the type of the view whose dispatch pointer is to be retrieved.

The following table lists the values for this parameter.

Value

View type

 

Value

View type

1

Contacts view

 

4

Task List view

2

Contact List view

 

5

Calendar view

3

Groups view

 

6

E-mail view (To create an E-mail view, the E-mail system must have been set up in the ACT! application.)

Return type   Object/LPDISPATCH

See also         Create, CreateEx, FindExplorerView, GetView

GetLastError S_INVALID_INPUT, S_NO_OPENDB, S_VW_NOT_FOUND


CHAPTER

OLE Application Object
Error Codes

The following error codes apply only to the ACT! application. If an error occurs that is not caused by the OLE automation client’s code, please record the return value and the situation that caused it for use by technical support.

Value

Error code

Description

-1

 

General error

-2

 

Row is not visible in window

-10

S_UNKNOWN

Unknown internal error

100

S_ERROR

General error

101

S_NONE

No more items

102

S_NOT_FOUND

File not found

103

S_MAIN_WND

Application window not found

104

S_FRM_VW_SYS

Internal error

105

S_CON_DOC

No open database

106

S_GRP_FRM

Internal error

107

S_JUMP_TO_REC

Internal error

108

S_LOOKUP_FAIL

Internal error

109

S_ACTIVE_REC

Internal error

110

S_ACTIVE_TAB

Not used

111

S_ACTIVATE_TAB

Not used

112

S_GETFIELD_FAIL

Internal error

113

S_SETFIELD_FAIL

Internal error

114

S_INTERNAL

Not used

115

S_LIST_ERR

Internal error

116

S_VW_NOT_FOUND

Specified view does not exist

117

S_INVALID_INPUT

Invalid input

118

S_NO_COMPOSE_VW

Mail Compose view does not exist

119

S_GET_SELECTION_FAIL

Internal error

120

S_FOLDER_OPEN_FAIL

Internal error

121

S_VW_CREATE_FAIL

Not used

122

S_PROPS_NOT_FOUND

Preferences not found (internal error)

123

S_WRITE_FAIL

Failed to change user preferences (internal error)

124

S_NO_WP_DRVMGR

Internal error

125

S_NO_WP_DRIVER

No word processor driver (internal error)

126

S_NO_FAX_DRVMGR

Internal error

127

S_NO_FAX_DRIVER

No fax driver (internal error)

128

S_NO_DB

No open database

129

S_NO_SECURITY

Internal error

130

S_NOT_PRIVILEGED

Not enough privileges to perform operation

131

S_CREATE_NEWUSER

Internal error

132

S_NO_USER

No current user

133

S_NO_MATCH

Old and new passwords do not match

134

S_MEM_ERROR

Error allocating memory

135

S_NOMENU

Internal error

136

S_INVALID_CMD

Invalid command

137

S_CON_LIST

Internal error

138

S_FILE_OPEN

Unable to open specified file

139

S_MACRO_ERROR

Error running specified macro (internal error)

140

S_NO_CONTAINER

Not used

141

S_NO_DALLIST_VIEW

Internal error

142

S_VIEW_EXISTS

A view of the specified type already exists

143

S_NO_EMAIL

E-mail view does not exist

144

S_NO_CALVW

Calendar view does not exist

145

S_INVALID_VWTYPE

View type is invalid

146

S_NO_OPENDB

No open database

147

S_NO_TAB_CONTAINER

Internal error

148

S_DEFAULT_USED

Input was invalid. Default was used. (SetSynchSettings method)

148

S_INVALID_TAB

Invalid tab specified (SetActiveTab method)

149

S_ACTIVITY_INIT_FAIL

Internal error

150

S_HELPER_EEDIT_FAIL

Internal error

151

S_ADD_CONTACT

Internal error

152

S_NO_RECORD

No active record

153

S_RECORD_HISTORY

Could not record history

154

S_DUPLICATE_CONTACT

Duplicate contact

155

S_DUPLICATE_GRP

Duplicate group

156

S_DELETE_FAIL

Delete failed (internal error)

157

S_DUPLICATE

Internal error

158

S_BUILD_ERROR

Error building list (internal error)

159

S_CANT_SORT

Not used

160

S_STOP_EDIT

Internal error

161

S_NO_SCHEMA

Internal error

162

S_NOT_SORTABLE

Specified field is not sortable

163

S_INVALID_ID

Invalid ID specified

164

S_SET_NOT_ALLOWED

Set not allowed on specified field

165

S_DELETE_NOTALLOWED

Row cannot be deleted from the specified grid

166

S_NOT_IMPLEMENTED

Method not implemented

167

S_NO_OVERWRITE

File could not be overwritten

168

S_ASK_OVRWRITE

Not used

169

S_NOT_READY

Destination device is not ready

170

S_OPEN_FILE

Not used

171

S_ADD_FILE

Not used

172

S_SERVER_BUSY

ACT! application is waiting for user response

173

S_FILE_EXISTS

Destination file exists

174

S_WRITE_PROTECT

Destination file is write protected

175

S_NO_EMAIL_SYSTEM

E-mail system is not setup

176

S_NOT_SUPPORTED

Method is not supported

177

S_NO_OUTLOOK

No Outlook on the system

178

S_BAD_PARAM

Invalid parameter values

179

S_GRP_HAS_SUBGRP

The group has a subgroup (Delete method in GroupView object))

180

S_BAD_FILENAME

Invalid pathname, filename, or extension.

181

S_SCRIPT_ERROR

Script file for the TriggerActivitySeries method encountered an error.

 


III


ACT! Software Development Kit (SDK)
Technical Reference Guide
ACT! Scripting Support section

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Section III        ACT! Scripting Support

Chapter 1       Getting Started with ACT! TM Scripting Support.......................................... 427

Conventions used in this manual......................................................................... 427

Parameter types................................................................................................ 428

System requirements......................................................................................... 428

Overview........................................................................................................... 429

Chapter 2       Creating Scripts............................................................................................ 431

Adding a VBScript script file to ACT!................................................................... 431

Using ACT! Scripting Support with the OLE Application Object.............................. 432

Chapter 3       Event Notification Support........................................................................... 433

Registering the custom control............................................................................ 433

Using event control in Visual Basic...................................................................... 433

Using event control in Visual C++........................................................................ 434

Event control methods........................................................................................ 434

Register Method.......................................................................................... 434

UnRegister Method...................................................................................... 435

IsActRunning Method................................................................................... 435

Event control events........................................................................................... 436

OnContactAdd Event.................................................................................... 437

OnContactChange Event.............................................................................. 437

OnContactDelete Event................................................................................ 437

OnContactListChange Event......................................................................... 438

OnContactLookupChange Event.................................................................... 438

OnContactPosChange Event......................................................................... 438

OnDatabaseClose Event............................................................................... 439

OnDatabaseOpen Event............................................................................... 439

OnGroupAdd Event...................................................................................... 439

OnGroupChange Event................................................................................. 440

OnGroupDelete Event................................................................................... 440

OnGroupListChange Event............................................................................ 440

OnGroupPosChange Event........................................................................... 441

OnActUserWantsToClose Event.................................................................... 441


1

 
CHAPTER

Getting Started with ACT! TM Scripting Support

This section consists of three chapters that describe the ACT!TM Scripting Support component of the ACT! Software Development Kit (SDK). This component consists of this set of instructions on how to create scripts that can be notified of events in the ACT! application.

This document assumes that you are familiar with and using the following:

·         ACT! 4.0 or later for Windows

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

Conventions used in this manual

To help you easily identify information, the following conventions are used:

bold                                   Command names, function names, events, methods, and other text you need to type are shown in bold.

ALL CAPITALS                File names and messages are shown in all CAPITAL letters.

Courier                              Example code is shown in a monospaced Courier font. Comments in the code are preceded by an apostrophe (' Comment). If a line of code does not fit on a single line of the page, the remaining code is indented on the next line. Code examples are not case sensitive.

italic                                  Parameters, return variables, data structure names, and text that represent the type of text to be entered rather than a literal series of characters are shown in italic.

[brackets]                          Optional items in syntax statements are enclosed in brackets ([ ]). For example, [password] indicates that a password can be used with the command, but is not required. In commands, include the information within the brackets without the brackets.

Parameter1|Parameter2     Parameters are separated by a vertical bar (|) to indicate a mandatory choice between two items. Only one of the items can be specified.

...                                       Items that you can repeat are indicated by an ellipsis (… ) For example, devicename [...] indicates that you can optionally specify more than one device, separating the device names with a space.

Parameter types

The following table lists the data types that are referenced in this section. Parameter names follow Hungarian notation, beginning with a lowercase letter or letters that indicate the data type.

Parameter syntax

Data type

date

Date and time in Short Date style and Time style from Windows Regional Settings (DATE in Visual C++)

fParameter

Float (Single in Visual C++)

iParameter

Short integer

lParameter

Long integer

szString

String, terminated by a null character (BSTR in Visual C++)

True|False or
bParameter

Boolean

vParameter

Variant (VARIANT in Visual C++)

System requirements

ACT! scripting support requires:

·         ACT! 4.0 or later for Windows

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

·         Microsoft Internet Explorer version 3.0 or later

Overview

Third-party applications developed in any language with container support for ActiveX controls (such as VBScript, Visual Basic, and Visual C++) can receive immediate notification of ACT! events and act on them. The ACT! events include opening and closing an ACT! database as well as changing records in the Contact and Group views and the Contact and Group lists.

You can use all objects, methods, and properties in the ACT! OLE Application Object in a script; however, the objects, methods, and properties in the ACT! OLE Database Object are not available for use in scripts. For additional information about using the features of the Application Object, see “Using ACT! Scripting Support with the OLE Application Object” on page 10.


2

 
CHAPTER

Creating Scripts

ACT! 4.0 or later supports execution of VBScripts inside the ACT! application through the ACT! toolbar. You can use all objects, methods, and properties of the ACT! OLE Application Object inside the environment of VBScripts when executing inside ACT! This will help developers who want to use the scripting in conjunction with the OLE Application Object. (You cannot use the ACT! OLE Database Object in a script.) The script support is provided through Microsoft VBScript Engine. The capabilities and limitations of using VBScript inside the ACT! application depends upon the version of the VBScript engine installed on the computer running ACT!

Microsoft Internet Explorer 3.0.2 or later includes the required VBScript scripting engine. If Internet Explorer version 3.0.2 or later is installed, a separate installation of the VBScript scripting engine is not required. If you encounter an error trying to execute a script file, make sure you have the correct version of VBScript scripting engine. The latest version of the VBScript scripting engine is available at: http://msdn.microsoft.com/scripting/default.htm.

Adding a VBScript script file to ACT!

The following steps describe how to add a VBScript file to ACT!

1        Create a text file containing your VBScript code, named with an extension of .VBS, such as MYFILE.VBS. ACT! requires the extension name of .VBS to recognize the file as a VBScript file.

2       Using toolbar customization feature of ACT!, add a new command and specify the name of the VBScript file on the command line. Then add a button to the toolbar and associate the newly created command with that button. If you are not familiar with toolbar customization features of ACT!, see Chapter 17 of the ACT! 2000 User’s Guide for more information.

3       After you have completed adding the button, it will appear on the ACT! toolbar. Click the added button to execute you script.

Using ACT! Scripting Support with the OLE Application Object

You can use all ACT! OLE Application Object objects, methods, and properties in a script. To use the objects, methods, and properties of the ACT! Application Object, include the word “Application” in the script. For example, you can include the following in the script to create the Views object and a Contact view object:

objViews = Application.Views
objViews.Create(1,”CV”)

Note: Additional examples of Scripting Support are available in ACT! SDK samples in the Event_Script Samples\Scripts folder.

Following is an example script that shows how the ACT! OLE Application object can be used inside a VBScript added to the ACT! application.

Sub ShowMessageBox(ByVal strMsg)

   Msgbox strMsg

End Sub

'Display current ACT! caption to user

ShowMessageBox Application.Caption

'Now change the ACT! application caption

Application.Caption = "My Copy of ACT!"

'Now display the new ACT! caption to the user

ShowMessageBox Application.Caption

The following sample script illustrates how to perform calculations on field values. It adds the values in two User fields and places the result in a third User field.

'This script demonstrates the calculation of User fields. It adds the values 'in the User1 and User2 fields and places the result in the User3 field.

'It assumes that User1, User2, and User3 are all Currency fields.

'If either the User1 or the User2 field is blank, it is assumed to be 0.

'You can use a similar script to perform any other calculation.

 

Set objViews = Application.Views

Set objContactView = objViews.Create(1, "CV")

 

objContactView.SetActiveTab "User Fields"

'Assuming that User1, User2 and User 3 are Currency fields

'If User1 or User2 is blank then calculate as if 0

Val1 =objContactView.GetField(50)

If Val1 = "" then Val1 = 0

   Val2 = objContactView.GetField(51)

If Val2 = "" then Val2 = 0

   'Calculate User1 + User2

   Val3 = CCur(Val1) + CCur(Val2)

'Set User3 as the result

objContactView.SetField 52, Val3


3

 
CHAPTER

Event Notification Support

Event notification support enables users to get notification of events from the ACT! application. This chapter contains a list of the supported events. Event notification support is provided through ActiveX controls.

Applications developed in any language with container support for ActiveX controls can receive notification of a variety of ACT! events. An ActiveX control is a software component that incorporates ActiveX technology. For additional information on ActiveX controls, visit http://www.download.com/PC/Activex/ or www.microsoft.com.

In ACT! 2000 or later, when you delete a lookup of contacts or groups, or multiple contacts from the ContactList view, import contacts or groups into the current database, or perform a sort, event notifications are turned off until the process completes. Then the ContactListChange and GroupListChange events are called, which return updated counts of the contacts and groups.

Registering the custom control

When ACT! for Windows is installed, the OLE custom control ACTEVENT.OCX is automatically installed and registered in the folder containing the ACT! executable file. If ACTEVENT.OCX is not registered, you can register it by executing ACTREG.EXE. ACTREG.EXE is automatically installed in the folder containing the ACT! executable file.

Using event control in Visual Basic

To get notification of ACT! events in a Visual Basic application:

1        Start Visual Basic.

2       Select Custom Controls from the Tools menu (Visual Basic 4) or Components from the Project menu (Visual Basic 5).

3       Click Browse and select ACTEVENT.OCX in the ACT folder.
The ACT! icon is added to the Visual Basic Toolbox.

4       Drag the ACT! icon onto the Visual Basic Form.

By default, the name is ActEvent1. The object has no visible properties.

Using event control in Visual C++

To get notification of ACT! events in a C++ application:

1        Start C++ and create a new MFC project.

2       In the Dialog Editor, select Insert OLE Control.

3       In the Insert OLE Control dialog box, select ActEvent Control and click OK.

A control appears with no visible properties.

To include a notification of an ACT! event:

In the ClassWizard, select an ACT! event in the Messages scroll list and click Add Function.

Event control methods

The following methods are included for setting up event control to begin or end notification of ACT! events or to verify that ACT! is running. You must call Register to receive notification of ACT! events. Use UnRegister when you no longer want notification of events and IsActRunning to verify that ACT! is still running.

Methods

Method Name

Parameter(s)

Parameter Type(s)

Return Type

Register

lparam

Long Integer

Long Integer

UnRegister

None

¾

Long Integer

IsActRunning

None

¾

Boolean

Register Method

Description    Enables the reception of ACT! event notification. This method is typically called at the beginning of the program to enable the reception of messages. ACT! should be running when you call this method.

Syntax            object.Register(lparam)

Parameters    lparam                   A long integer. This parameter is ignored.

Return type   Long Integer

Comments     This method returns one of the following values:
> 0       Any positive integer indicates that ACT! is running.
   0       ACT! is not running.
  -1       The event is already registered. An event cannot be registered more than once.
<-1       An undefined error occurred.

Example         Dim i as long

i = ActEvent1.Register(0)

If i < 1 Then

   If ActEvent1.IsActRunning = False Then

       MsgBox "Please bring up ACT! and start again."

   Else

       MsgBox "Problem registering ACT! Event."

       Please run actreg.exe and try again!"

   End If

End If

UnRegister Method

Description    Disables the receipt of ACT! event notifications. Call this method when you no longer want to receive notification of ACT! events.

Syntax            object.UnRegister

Return type   Long Integer

Example         ActEvent1.UnRegister

IsActRunning Method

Description    Returns True if ACT! is running and False if ACT! is not running. Call this method to verify that the user has not exited from ACT!

Syntax            object.IsActRunning

Return type   Boolean

Example         See Register.


Event control events

The following table lists the events supported.

Event

Called when the user:

OnContactAdd

Adds a new contact or saves the record for the current contact. Returns a null string if the user adds a contact or the Unique ID of the current contact when the user saves a new contact.

OnContactChange

Makes any change to the record for the current contact. Returns the Unique ID of the current contact.

OnContactDelete

Deletes a contact. Returns the Unique ID of the deleted contact.

OnContactListChange

Makes any change in the number of contacts in the Contact List. Changes to the number of contacts in the Contact List include changing the lookup, adding a contact, and deleting a contact. Returns an updated count of the contacts in the Contact List.

OnContactLookupChange

Makes a change to the current lookup, including adding or deleting a contact or performing a different lookup.

OnContactPosChange

Selects a different contact in the Contact view. Returns the Unique ID of the selected contact.

OnDatabaseClose

Closes the database.

OnDatabaseOpen

Opens a database. Returns the name of the database that is currently open.

OnGroupAdd

Adds a new group or saves the current group. Returns a null string if the user adds a group or the Unique ID of the current group when the user saves a new group.

OnGroupChange

Makes any change to the current group. Returns the Unique ID of the current group.

OnGroupDelete

Deletes a group. Returns the Unique ID of the group that was deleted.

OnGroupListChange

Changes the number of contacts in a group (such as adding or deleting a contact) or displays the Group view. Returns an updated count of the contacts in the group.

OnGroupPosChange

Selects a different group. Returns the Unique ID of the active group.

OnActUserWantsToClose

Selects Close from the File menu or clicks the Close box in the ACT! window.

OnContactAdd Event

Description    This event is called when the user adds a new contact or saves the record for the current contact. Returns a null string if the user adds a contact or the Unique ID of the current contact when the user saves a new contact. In ACT! 2000 or later, this event is turned off during the import of contacts into the current database.

Syntax            OnContactAdd(szUniqueID)

Parameters    szUniqueID            A string with either of the following values:
Null            User is adding a new contact.
Unique ID   User has saved a new contact.

Example         Private Sub ActEvent1_OnContactAdd(ByVal lpszUniqueID as string)

 

'Initially when ContactAdd is done, a blank record is generated and

'at that time Unique ID is ""

'After Save the Unique ID gets a value.

 

If lpszUniqueID <> "" Then

   MsgBox "Contact with Unique ID: " & lpszUniqueID & " added."

End if

 

End Sub

OnContactChange Event

Description    This event is called when the user makes any change to the record for the current contact. Returns the Unique ID of the current contact.

Syntax            OnContactChange(szUniqueID)

Parameters    szUniqueID            A string containing the Unique ID of the current contact.

Example         Private Sub ActEvent1_OnContactChange(ByVal lpszUniqueID as string)

   MsgBox "Contact with Unique ID: " & lpszUniqueID & "has changed."

End Sub

OnContactDelete Event

Description    This event is called when the user deletes a contact. Returns the Unique ID of the deleted contact. In ACT! 2000 or later, this event is turned off while deleting a lookup of contacts or while deleting multiple contacts from the Contact List view.

Syntax            OnContactDelete(szUniqueID)

Parameters    szUniqueID            A string containing the Unique ID of the deleted contact.

Example         Private Sub ActEvent1_OnContactDelete(ByVal lpszUniqueID as string)

   MsgBox "Contact with Unique ID: " & lpszUniqueID & "deleted."

End Sub

OnContactListChange Event

Description    This event is called when the user makes any change in the number of contacts in the Contact List. Changes to the number of contacts in the Contact List include changing the lookup, adding a contact, and deleting a contact. Returns an updated count of the contacts in the Contact List.

Syntax            OnContactListChange(lCount)

Parameters    lCount                    A long integer indicating the number of contacts now in the Contact List.

Example         Private Sub ActEvent1_OnContactListChange(ByVal nCount as long)

   MsgBox "The Contact List has changed. The New Contact Count is" & nCount

End Sub

OnContactLookupChange Event

Description    This event is called when the user makes a change to the current lookup, including adding or deleting a contact or performing a different lookup. In ACT! 2000 or later, this event is not called while importing contacts into the database, while deleting a lookup of contacts, or while deleting multiple contacts from the Contact List view.

Syntax            OnContactLookupChange

OnContactPosChange Event

Description    This event is called when the user selects a different contact in the Contact view. Returns the Unique ID of the selected contact.

Syntax            OnContactPosChange(szUniqueID)

Parameters    szUniqueID            A string containing the Unique ID of the currently active contact.

Example         Private Sub ActEvent1_OnContactPosChange(ByVal lpszUniqueID as string)

   MsgBox "The Current Contact is now: " & lpszUniqueID

End Sub

OnDatabaseClose Event

Description    This event is called when the user closes the database.

Syntax            OnDatabaseClose

Example         Private Sub ActEvent1_OnDatabaseClose()

   MsgBox "The Database has closed."

End Sub

OnDatabaseOpen Event

Description    This event is called when the user opens a database. Returns the name of the database that is currently open.

Syntax            OnDatabaseOpen(szDBName)

Parameters    szDBName             A string containing the name of the database that is now open.

Example         Private Sub ActEvent1_OnDatabaseOpen(ByVal lpszDBName as string)

   MsgBox lpszDBName & " database open."

End Sub

OnGroupAdd Event

Description    This event is called when the user adds a new group or saves the current group. Returns a null string if the user adds a group or the Unique ID of the current group when the user saves a new group. In ACT! 2000 or later, this event is not called while groups are being imported.

Syntax            OnGroupAdd(szUniqueID)

Parameters    szUniqueID            A string with either of the following values:
Null            User is adding a new contact.
Unique ID   User has saved a new contact.

Example         Private Sub ActEvent1_OnGroupAdd(ByVal lpszUniqueID as string)

'Initially when GroupAdd is done, a blank record is generated and

'at that time Unique ID is ""

'After Save the Unique ID gets a value.

If lpszUniqueID <> "" Then

   MsgBox "Group with Unique ID: " & lpszUniqueID & " added."

End Sub

OnGroupChange Event

Description    This event is called when the user makes any change to the current group. Returns the Unique ID of the current group.

Syntax            OnGroupChange(szUniqueID)

Parameters    szUniqueID            A string containing the Unique ID of the current group.

Examples       Private Sub ActEvent1_OnGroupChange(ByVal lpszUniqueID as string)

   If lpszUniqueID <> "" Then

       MsgBox "Group with Unique ID: " & lpszUniqueID & " changed."

   End if

End Sub

OnGroupDelete Event

Description    This event is called when the user deletes a group. Returns the Unique ID of the group that was deleted. In ACT! 2000 or later, this event is not called during the deletion of a group lookup.

Syntax            OnGroupDelete(szUniqueID)

Parameters    szUniqueID            A string containing the Unique ID of the deleted group.

Example         Private Sub ActEvent1_OnGroupDelete(ByVal lpszUniqueID as string)

   If lpszUniqueID <> "" Then

       MsgBox "Group with Unique ID: " & lpszUniqueID & " deleted."

   End if

End Sub

OnGroupListChange Event

Description    This event is called when the user adds or deletes a group or changes the groups lookup. Returns an updated count of the groups in the Groups view.

Syntax            OnGroupListChange(lCount)

Parameters    lCount                    A long integer indicating the number of contacts now in the group.

Example         Private Sub ActEvent1_OnGroupListChange(ByVal nCount as long)

   MsgBox "The Group List has changed. The New Group Count is " & nCount

End

OnGroupPosChange Event

Description    This event is called when the user selects a different group. Returns the Unique ID of the active group.

Syntax            OnGroupPosChange(szUniqueID)

Parameters    szUniqueID      A string containing the Unique ID of the active group.

Example         Private Sub ActEvent1_OnGroupPosChange(ByVal lpszUniqueID as string)

   MsgBox "The current group is now: " & lpszUniqueID

End Sub

OnActUserWantsToClose Event

Description    This event is called when the user selects Close from the File menu or clicks the Close box in the ACT! window.

Syntax            OnActUserWantsToClose(bIsFinal)

Parameter      bIsFinal                 A Boolean indicating whether ACT! is closed. A True value indicates that ACT! is closed; a False value indicates that it is not closed.

Comments     If ACT! is being controlled by the Application Object, when the user closes ACT!, this event is generated twice: Once before the application actually closes (bIsFinal is False) and then again when ACT! closes (bIsFinal is True).

Example         Private Sub ActEvent1_OnActUserWantsToClose(ByVal bIsFinal As Boolean)

   If bIsFinal = False Then

       'ACT! is given an indication of user wanting to close.

       'It is a good time to utilize the Application Object.

       MsgBox "ACT! user wants to close. Uninitializing Application Object "

          & vbCrLf & "Closing ACT!"

       'If you are using the Application object, uninitialize it now.

       'It is a good time to uninitialize any other objects you may have

       'references to.

       Set objApp = Nothing

   Else

       ActEvent1.UnRegister

       End

   End If

End Sub


IV


ACT! Software Development Kit (SDK)
Technical Reference Guide

Adding Extensible Views and Tabs to ACT! section

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Section IV      Adding Extensible Views and Tabs to ACT!

Chapter 1       Getting Started with Extensible Views and Tabs...................................... 445

Syntax conventions used in this manual.............................................................. 445

Overview........................................................................................................... 446

System requirements......................................................................................... 449

What’s new....................................................................................................... 449

Changes for ACT! 2000................................................................................. 449

Changes for ACT! 2000 version 5.0.2............................................................. 449

Chapter 2       Creating a Control File................................................................................. 451

Defining the control file header............................................................................ 452

Defining the view in the View section................................................................... 452

Adding navigation buttons to the toolbar in the Commands section (ACT! 4.0 only).. 455

Adding URL buttons to the navigation toolbar in the URL section............................ 456

Creating a custom bitmap for the View bar button........................................... 457

Creating custom icons for navigation toolbar buttons....................................... 458

Using a sample control file.................................................................................. 458

Editing a sample control file.......................................................................... 459

Using the added views and tabs.......................................................................... 459

Removing control files........................................................................................ 459


1

 
CHAPTER

Getting Started with Extensible Views and Tabs

This section consists of two chapters that describe the Adding Extensible Views and Tabs to ACT!TM component of the ACT! Software Development Kit (SDK). This component consists of three sample control files provided with the SDK and this set of instructions on how to create additional control files. These instructions are written for programmers who are developing software that will add views, accessible by a Contact or Group tab or View command, to display HTML content.

This document assumes that you are familiar with and using the following:

·         ACT! for Windows, version 4.0 or later

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

Syntax conventions used in this manual

The following syntax conventions are used in this manual.

bold                                   Statement names, arguments, and other text you need to type are shown in bold.

Courier                              Example statements are shown in a monospaced Courier font. Comments are preceded by two number signs
(## Comment). If a statement does not fit on a single line of the page, the remaining text is indented on the next line. Control file statements are not case sensitive.

italic                                  Statement arguments and other text that represents the type of text to be entered rather than a literal series of characters are shown in italic.

[brackets]                          Brackets are required parts of a statement where shown in the control file format. Do not leave a space within brackets.

Argument1|Argument2       Arguments are separated by a vertical bar (|) to indicate a choice between two or more items. Only one of the items can be specified.

Overview

You can extend the views and view tabs of ACT! so that users can view an Internet site or document by choosing a button on the View bar or a command from the View menu, or by clicking a tab in the Contact or Group view. For example, you can add a command to the View menu that displays a company’s Internet site where users can view order entry information, inventory data, or general company information. The Internet site can be specific, for a particular contact, or general for a group.

You specify three types of Internet views:

·         Floating view

·         Contact tab view

·         Group tab view

In a floating view, users can browse the site using a navigation toolbar that mimics the operation of a typical web browser toolbar. In addition, you can add buttons to the toolbar to navigate to URLs of other Internet sites or to display HTML format files.

You specify the type of view, the URL or document to be displayed, and the View bar and navigation toolbar buttons in a control file. You can create any number of control files, but each control file can display only one view. After creating the control file, you can add it to the folder in the location specified in General Preferences for the NetLinks file type. The default folder location is C:\PROGRAM FILES\SYMANTEC\ACT\NetLinks. When the user starts ACT!, all files with a .CTL extension in the folder specified for the NetLinks file type are automatically executed. If you do not want to load a control file at startup, add it to a different folder such as the ACT! program files folder, or give it a different extension. Then you can use the CreateBrowserView method in the Views object of the ACT! OLE Application Object to load the control file as needed. See the ACT! OLE Application Object section of the ACT! for Windows Software Development Kit (SDK) for more information.

Sample Contact tab view and control file:

 

ACT! Browser Control File Version 1.00

## This is a Contact tab view sample

 

[VIEW]

TYPE = CONTACTTAB

## The URL to launch when you select the tab

STARTURL = "http://weather.yahoo.com/"

## The title that appears as the caption for the tab

TITLE = "Weather"

 

PRIORITY = 3

Sample Floating view and control file:

 

ACT! Browser Control File Version 1.00

##This is a Floating view sample

 

[VIEW]

TYPE = FLOATVIEW

 

## The starting URL when the view is opened

STARTURL = "http://weather.yahoo.com/"

 

## The title that appears as the caption for the view

TITLE = "Internet"

 

## The menu item name that appears on the View bar and the View menu

MENU = "Internet"

 

## The button for the View bar

BUTTON =  "Internet", 24021, "c:\Program Files\Symantec\Act\actres.dll"

 

PRIORITY = 3

 

[URL]

## Buttons on the toolbar that link to specified web sites

"http://search.yahoo.com/search/options" = "Search", 24003,

   "c:\Program Files\Symantec\Act\actres.dll", 24013,

   "c:\Program Files\Symantec\Act\actres.dll"

"http://maps.yahoo.com/" = "Map", 24001,

   "c:\Program Files\Symantec\Act\actres.dll", 24011,

   "c:\Program Files\Symantec\Act\actres.dll"

"http://dir.yahoo.com/Regional/U_S__States/" = "Local info", 24002,

   "c:\Program Files\Symantec\Act\actres.dll", 24012,

   "c:\Program Files\Symantec\Act\actres.dll"

"http://quote.yahoo.com/" = "Stock quotes", 24004,

   "c:\Program Files\Symantec\Act\actres.dll", 24014,

   "c:\Program Files\Symantec\Act\actres.dll"

"http://weather.yahoo.com/" = "Weather", 24005,

   "c:\Program Files\Symantec\Act\actres.dll", 24015,

   "c:\Program Files\Symantec\Act\actres.dll"

System requirements

To extend views and view tabs, you must have ACT! 4.0 or later for Windows and Microsoft Internet Explorer version 3.0.2 (Build 1300) or later.

If a Web site referenced in the control file uses Java, there may be a problem with Microsoft Internet Explorer 3.0.2. This is a known problem that has been corrected in Internet Explorer 4.0 or later.

What’s new

Adding extensible views and tabs requires ACT! 4.0 or later. This section lists changes for ACT! 2000.

Changes for ACT! 2000

The following changes have been made for ACT! 2000:

·         In ACT! 2000, the button that starts a Floating view is located on the View bar or the Mini View bar. In ACT! 4.0, the button is on the Mini View bar.

·         The Commands section of a control file is ignored in ACT! 2000. All buttons that can be defined in the Commands section for the navigation toolbar in ACT! 4.0 are automatically defined in ACT! 2000.

Changes for ACT! 2000 version 5.0.2

The following changes have been made for ACT! 2000 version 5.0.2:

·         The MENU statement in the View section of the control file is now optional.

·         The value for the tooltip argument in the BUTTON statement in the View section of the control file is used as the name of the button on the View bar instead of the value for the command name argument in the MENU statement.

·         Support for buttons containing icon (.ico) files added to the BUTTON statement in the View section of the control file.

·         The CreateBrowserView method has been added to the Views object of the ACT! OLE Application Object to load a control file as needed instead of when ACT! is started. See the ACT! OLE Application Object section of the ACT! Software Development Kit (SDK) for more information.

·         A Print command has been added to the toolbar and the File menu.


2

 
CHAPTER

Creating a Control File

The control file specifies the type of view and location of the Internet site or document and the function and appearance of the navigation toolbar. It also specifies if the user can open a view from the View bar or a command on the View menu, or a tab in the Contact or Group view.

You must create a control file for each Floating view or tab view. The control file includes two required sections and two optional sections:

·         Control file header is required to specify the version of the control file.

·         The View section is required to define the type of view and HTML content to be viewed.

·         The Commands section is ignored in ACT! 2000 or later. This section is optional for Floating views in ACT! 4.0 and ignored for Contact and Group tab views. It specifies the navigation buttons and their icons that appear for a Floating view. Navigation buttons are automatically defined and not needed in the control file in ACT! 2000 or later.

·         The URL section is optional for Floating views and ignored for Contact and Group tab views. It specifies the navigation toolbar buttons that can be used to display additional Internet sites and HTML documents.

The following figure shows the format of required and optional statements in a complete control file.

ACT! Browser Control File Version 1.00

 

[VIEW]

TYPE = FLOATBAR | CONTACTTAB | GROUPTAB

## The starting URL when the view is opened

STARTURL = "url"

## The title that appears as the caption for the view or the tab

TITLE = "window_title"

## The menu item name to add to the View bar and View menu

## The MENU statement is optional for ACT! 2000 version 5.0.2 or later

MENU = "command_name"

## The tooltip argument requires ACT! 4.0 or ACT! 2000 version 5.0.2 or later

## For other versions of ACT!, specify a string, such as the value used for the

## command_name argument of the MENU statement

BUTTON = "tooltip", icon_id, "library"
or
BUTTON = "tooltip", "bitmap.bmp"

PRIORITY = n

 

[COMMANDS]

## This section is ignored in ACT! 2000 or later

nav_button = "tooltip", small_icon_id, "library", large_icon_id, "library"
or
nav_button = "tooltip", "small.ico", "large.ico"

 

[URL]

## The URL buttons to add to the navigation toolbar

"url" = "tooltip", small_icon_id, "library", large_icon_id, "library"
or
"url" = "tooltip", "small.ico", "large.ico"

Each statement in the control file is explained in the sections that follow.

Defining the control file header

The following statement must be the first line of the control file:

ACT! Browser Control File Version 1.00

Defining the view in the View section

The View section of the control file specifies:

·         The type of view

·         The starting URL or document that is displayed when the user launches the view

·         The name of the view to be displayed on title bar of the view or the tab

·         The name of the view to be displayed on the View bar and the View menu

·         The button to be displayed on the ACT! View bar

·         The priority of the view, relative to other views in the NetLinks folder

The View section can include the following statements.

[VIEW]

This statement is required and must be the first statement after the control file header.

TYPE = FLOATBAR | CONTACTTAB | GROUPTAB

This statement is required to specify the type of view. Include only one of the following arguments:

FLOATVIEW                            Creates a floating view

CONTACTTAB                        Creates a tab in the Contact view

GROUPTAB                              Creates a tab in the Group view

STARTURL = "url"

This statement is required. The argument for this statement is:

url                    The Universal Resource Locator (URL) of the Internet site or the file name of the HTML format document that is displayed when users choose the view from the View bar or View menu (Floating view), or click the view tab (Contact or Group tab view). The URL or file name must be enclosed in quotation marks.

TITLE = "window_title"

This statement is required. For Floating views, this statement specifies the text to appear in the title bar of the view. For Contact tab and Group tab views, it specifies the text to appear on the tab. The argument for this statement is:

window_title    The title to appear in the title bar of the Floating view or the text to appear on the tab in the Contact or Group tab view. The text must be enclosed in quotation marks.

MENU = "command_name"

This statement is optional in ACT! 2000 version 5.0.2 or later (required in previous versions of ACT!) for Floating views and is not needed and ignored for Contact and Group views.

The argument for this statement is:

command_name     The name of the Floating view added as a menu item to the View menu. In versions of ACT! previous to ACT! 2000 version 5.0.2, this name is also added under the button for the view on the View bar. The view name must be enclosed in quotation marks.

BUTTON = "tooltip", icon_id, "library"
or
BUTTON = "tooltip", "bitmap.bmp"
or
BUTTON
= "tooltip", "icon.ico" (requires ACT! 2000 version 5.0.2 or later)

This statement is optional for Floating views and is not needed and ignored for Contact and Group views. Use either format of this statement to specify a standard View bar button or custom bitmap file for the view to be displayed on the ACT! View bar. This statement also specifies the text of the tooltip in ACT! 4.0, and the name for the button in ACT! 2000 version 5.0.2 or later. The arguments for this statement are:

tooltip              The text of the tooltip for the View bar button in ACT! 4.0 and the name for the button in ACT! 2000 version 5.0.2 or later. This argument is ignored in ACT! 2000 versions 5.0 and 5.0.1, but a string is required in all versions of ACT! The text must be enclosed in quotation marks. It’s recommended that you use the value you specified for the command_name argument of the MENU statement.

icon_id            An integer specifying the resource ID of the icon to be displayed on the View bar for the view.

                      The following table lists IDs for the standard View bar button icons supplied in the ACT! 2000 ACTRES.DLL file:

Image

Icon ID

 

Image

Icon ID

24021

 

24024

24022

 

24025

24023

 

 

 

library             The name of the file containing the icon. The file name must be enclosed in quotation marks. Specify the ACTRES.DLL file in the \ACT folder to use a standard View bar button icon supplied with ACT! 2000 or later.

bitmap.bmp      The name and path of a bitmap file containing the image for a custom button to be displayed on the View bar for the view. The default path is the \ACT folder.

PRIORITY = n

This statement is optional. It determines the relative position of either the view on the View menu or the tab in the Contact and Group views If you omit this statement, ACT! uses a default priority of 0 (zero), which is the lowest priority.

The argument for this statement is:

n                      An unsigned integer indicating the priority of the view; the higher the value of n, the higher the priority of the view. The highest priority view appears at the top of the list of extensible views in the View menu or in the leftmost extensible view tab in the Contact and Group views.

Adding navigation buttons to the toolbar in the Commands section (ACT! 4.0 only)

If you’re creating a Floating view for ACT! 4.0 only, you can display a navigation toolbar containing buttons that allow the user to perform the same navigation functions as a typical web browser. You specify the icons to be displayed on the toolbar in the Commands section of the control file.

Note: ACT! 2000 automatically supplies the navigation toolbar buttons that can be defined in this section.

The Commands section is optional for ACT! 4.0, and ignored in ACT! 2000. If you omit the Commands section for ACT! 4.0, no navigation toolbar appears when the user displays the view. This section is ignored for Contact and Group views.

[COMMANDS]

Use either of the following formats of this statement to specify the location of the icon for each navigation button to be displayed on the toolbar. The buttons appear on the toolbar in the order in which they are specified in the control file.

nav_button= "tooltip", small_icon_id, "library", large_icon_id, "library"
or
nav_button = "tooltip", "small.ico", "large.ico"

The arguments for this statement are:

nav_button      The name of the button to appear on the navigation toolbar and must be one of the following:
HOME
FORWARD
BACK
STOP
REFRESH

tooltip              The text of the tooltip for the button. The text must be enclosed in quotation marks.

small_icon_id,  An integer specifying the resource ID of the small and large icons to be
large_icon_id  displayed. on the navigation toolbar. Resource IDs must be enclosed in
                        quotation marks.

library             The name of the file containing the icon. The file name must be enclosed in quotation marks.

small.ico,         The names of the files containing the small and large custom icons to be
large.ico          displayed on the navigation toolbar. The file names must be enclosed in
                        quotation marks.

Adding URL buttons to the navigation toolbar in the URL section

The Floating view displays a navigation toolbar that contains standard buttons for navigating that function like a typical web browser. You can add buttons to the toolbar so that users can view other Internet sites or HTML format documents. These URL buttons appear to the right of the standard navigation buttons, in the order in which they appear in the control file.

A toolbar with navigation buttons automatically defined by ACT! 2000 and standard toolbar URL buttons (large buttons shown) supplied with ACT! 2000 and linked to URLs or HTML documents is shown below:

This section is optional for Floating views, and ignored for Contact and Group views.

[URL]

Include this section if you want to display buttons on the navigation toolbar for access to other Internet sites or documents.

Use either of the following formats of this statement to specify the location of the icons for each URL button. Include one statement for each button that you want to appear on the toolbar.

"url" = "tooltip", small_icon_id, "library", large_icon_id, "library"
or
"url" = "tooltip", "small.ico", "large.ico"

The arguments for this statement are:

url                    The Universal Resource Locator (URL) of the Internet site or the file name of the HTML format document that is displayed when users click the button on the toolbar. The URL or file name must be enclosed in quotation marks.

tooltip              The text of the tooltip for the button. The text must be enclosed in quotation marks.

small_icon_id,  An integer specifying the resource ID of the small and large icon to be
large_icon_id  displayed on the navigation toolbar. Specify a small and large icon from the
                        same set.

The following table lists IDs for the standard toolbar button icons supplied with ACT! 2000:

Set No.

Image

Small icon ID

 

Image

Large icon ID

1

24001

 

24011

2

24002

 

24012

3

24003

 

24013

4

24004

 

24014

5

24005

 

24015

library             The name and path of the file containing the icon. The file name must be enclosed in quotation marks. Specify the ACTRES.DLL file in the \ACT folder to use a standard toolbar button icon supplied with ACT! 2000.

small.ico,          The name of the file containing the small and large icons to be displayed
large.ico          on the navigation toolbar. The file names must be enclosed in quotation
                        marks.

Creating a custom bitmap for the View bar button

For ACT! 2000 you create a 32 x 32 pixel bitmap image for a custom View bar button, which ACT! automatically reduces to 16 x 16 for the Mini View bar. ACT! 4.0 requires a 16 x 16 pixel bitmap placed in the upper left corner of a 32 x 32 image.

To create a new bmp file in Microsoft Visual C++:

1        To create a new bitmap image, choose File > New > Files > Bitmap File.

2       In View properties in Visual C++, choose View > Properties to size the image to 32 x 32 pixels.

3       Draw or copy an image to the new bitmap.

Note: For ACT! 4.0, paste a 16 x 16 bitmap image into the upper left corner of the 32 x 32 image.

4       Save the new bitmap file.

Creating custom icons for navigation toolbar buttons

A set of icons containing matching small (16 x 16) and large (24 x 24) icons is required for each custom button.

To create the small icon file:

1        Create a new icon file.

2       Click the button to the right of size selector combo box and select 16 x 16 size.

3       Draw or copy your image onto the new icon.

4       Delete other images except the 16 x 16 image.

5       Save the new icon file.

To create the large icon file:

1        Create a new icon file.

2       Click the button to the right of size selector combo box and select custom.

3       Enter 24 for both the width and height.

4       Draw or copy your image onto the new icon.

5       Delete other images except the 24 x 24 image.

6       Save the new icon file.

Using a sample control file

Sample Float, Contact tab, and Group tab view control files are supplied with the ACT! SDK.

To use the sample control file:

1        Edit a sample control file using any standard text editor such as Notepad.

2       Rename the sample control file and save it, with the .CTL extension, in the folder in the location specified in General Preferences for the NetLinks file type. The default folder location is C:\PROGRAM FILES\SYMANTEC\ACT\NetLinks.

3       Start ACT! When started, ACT! executes all files with a .CTL extension in the folder specified for the NetLinks file type

Note: If a control file does not function as expected, check the CONTROL.ERR file in the NetLinks folder for errors such as spelling mistakes, incorrect file names or locations, or other errors. The error file lists the name of the control file, the type of each error detected, and the time each error was generated. Any control file with errors is ignored by the ACT! application.

Editing a sample control file

Keep the following rules in mind as you edit a sample control file:

·         The control file must contain at least the control file header and the [VIEW], STARTURL, TITLE, and MENU statements. All other sections and statements are optional. The [COMMANDS] section is ignored in ACT! 2000.

·         You can enter the statements within a section in any order.

·         You can add spaces between elements in a statement and blank lines between statements to improve the readability of the control file. However, do not include a space in the section headings [VIEW], [COMMANDS], and [URL].

·         Separate arguments in a statement with commas.

·         Be sure to include quotation marks where shown in the statement formats. Enclose all filenames, URLs, and tooltip text in quotation marks.

·         Be sure all URLs are valid; no verification is performed on URLs for validity.

·         You can add comments at the end of a statement or on a separate line. Precede each comment with two number signs (##).

Using the added views and tabs

The control files are executed when ACT! starts. Because a control file for a Floating view adds a button to the View bar and can add a command to the View menu, you should include an explanation of the button and command to your users.

Removing control files

If you no longer need a view, you can delete its control file, move the control file to a different folder, or change its extension.


V


ACT! Software Development Kit (SDK)
Technical Reference Guide

Adding Custom Commands to ACT! section

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Section V       Adding Custom Commands to ACT!

Chapter 1       Getting Started with Adding Custom Commands to ACT!...................... 463

Conventions used in this manual......................................................................... 463

Syntax conventions...................................................................................... 463

Overview........................................................................................................... 464

System requirements......................................................................................... 464

What’s new....................................................................................................... 464

Changes for ACT! 2000, version 5.0.2............................................................ 464

Chapter 2       Using the OLE Command Object for Adding Custom Commands........ 467

Understanding the Command Object................................................................... 467

Command object methods.................................................................................. 468

AddAuxCommand Method............................................................................ 469

AddAuxCommandEnabled Method (requires ACT! 2000 version 5.0.2 or later)... 471

AddAuxCommandToMenu Method (requires ACT! 2000 version 5.0.2 or later).... 472

AddAuxCommandToToolbar Method.............................................................. 474

AddAuxCommandToToolsMenu Method......................................................... 475

AddAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later)................ 476

AuxCommandExists Method........................................................................ 478

AuxCommandExistsInMenus Method (requires ACT! 2000 version 5.0.2 or later) 478

AuxCommandExistsInToolbar Method........................................................... 479

AuxCommandExistsInToolsMenu Method...................................................... 480

AuxSubMenuExists Method (requires ACT! 2000 version 5.0.2 or later)............. 480

DeleteAuxCommand Method........................................................................ 481

RemoveAuxCommandFromMenus Method (requires ACT! 2000 version 5.0.2 or later)          482

RemoveAuxCommandFromToolbar Method.................................................... 483

RemoveAuxCommandFromToolsMenu Method............................................... 484

RemoveAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later).......... 485

Chapter 3       Adding Custom Commands to ACT! Error Codes................................... 487

 


1

 
CHAPTER

Getting Started with Adding Custom Commands to ACT!

This section describes the ACT! TM OLE Command Object, which lets you add commands to ACT! that execute external programs.

This manual assumes that you are familiar with and using the following

·         ACT! 2000 or later for Windows

·         Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT 4.0

Conventions used in this manual

Syntax conventions

bold                                   Command names, function names, properties, methods, and other text you need to type are shown in bold.

ALL CAPITALS                File names and messages are shown in all CAPITAL letters.

Courier                              Example code is shown in a monospaced Courier font. Comments in the code are preceded by an apostrophe ('Comment). If a line of code does not fit on a single line of the page, the remaining code is indented on the next line. Code examples are not case sensitive.

italic                                  Parameters, return variables, data structure names, and text that represent the type of text to be entered rather than a literal series of characters are shown in italic.

[brackets]                          Optional items in syntax statements are enclosed in brackets ([ ]). For example, [password] indicates that a password can be used with the command, but is not required. In commands, include the information within the brackets without the brackets.

Parameter1|Parameter2     Parameters are separated by a vertical bar (|) to indicate a mandatory choice between two items. Only one of the items can be specified.

...                                       Items that you can repeat are indicated by an ellipsis (… ) For example, devicename [...] indicates that you can optionally specify more than one device, separating the device names with a space.

Overview

The Command Object lets you add commands to the ACT! graphical user interface that run programs outside of ACT! This object provides methods for creating these types of commands, testing whether commands have been created, and adding their associated toolbar buttons and menu items. Also, this interface provides methods for deleting these commands, deleting their associated toolbar buttons and menu items, and determining whether commands exist in toolbars or menus.

Adding a command is a two-step process. First, you define the command. Then, you add the command to a menu or tool bar.

System requirements

To use the OLE Command Object, you must have ACT! 2000 or later.

What’s new

The ACT! OLE Command Object requires ACT! 2000 or later. This section lists changes to the OLE Command Object for ACT! 2000 version 5.0.2.

Changes for ACT! 2000 version 5.0.2

Added methods

The following methods have been added for ACT! 2000 version 5.0.2:

New Method

New Method

AddAuxCommandEnabled

AuxSubMenuExists

AddAuxCommandToMenu

RemoveAuxCommandFromMenus

AddAuxSubMenu

RemoveAuxSubMenu

AuxCommandExistsInMenus

 

 


2

 
CHAPTER

Using the OLE Command Object for Adding Custom Commands

This chapter describes the methods available in the OLE Command Object.

Understanding the Command Object

The Command Object is implemented as an OLE Automation Inproc server. It manages a file named ACTCMD.INI that contains the necessary information to define auxiliary commands that ACT! loads when it starts.

The ACTCMD.INI file is created when you run an application using this object. These commands do not appear in the Customize ACT! dialogs. The ACTCMD.INI file is created by the ACT! SDK and distributing it to other ACT! users is not recommended. The maximum size of the ACTCMD.INI file is 64 KB.

The object name of the AuxCmds interface is ACTOLE.AUXCMDS. It exports methods that can be used to create, delete, and check for the existence of commands that load external applications. These commands can be added to a toolbar or to the Tools menu for a specific view. This chapter defines these methods.

Command object methods

The Command Object contains information about the custom commands. The following methods apply only to the Command Object.

Methods

Method Name

Parameter(s)

Parameter
Type(s)

Return Type

AddAuxCommand

szCommandName,
szCommandLine,
szStartIn,
szToolTip,
szDescription,
szSmallIconPath,
szLargeIconPath,
iRunState

String,
String,
String,
String,
String,
String,
String,
Short Integer

Long Integer

AddAuxCommandEnabled

szCommandName,
szCommandLine,
szStartIn,

szToolTip,
szDescription,
szSmallIconPath,
szLargeIconPath,
iRunState,

String,
String,
String,
String,
String,
String,
String,
Short Integer

Long Integer

AddAuxCommandToMenu

lViewID,
szMenuName,
lPosition,
lSeparator,
szCommandName

Long Integer,
String,
Long Integer,
Long Integer,
String

Long Integer

AddAuxCommandToToolbar

lViewID,
szCommandName

Long Integer,
String

Long Integer

AddAuxCommandToToolsMenu

lViewID,
szCommandName

Long Integer,
String

Long Integer

AddAuxSubMenu

lViewID,
szMenuName,
lPosition,
lSeparator,
szSubMenuName

Long Integer,
String,
Long Integer,
Long Integer,
String

Long Integer

AuxCommandExists

szCommandName

String

Boolean

AuxCommandExistsInMenus

lViewID,
szCommandName

Long Integer,
String

Boolean

AuxCommandExistsInToolbar

lViewID,
szCommandName

Long Integer,
String

Boolean

AuxCommandExistsInToolsMenu

lViewID,
szCommandName

Long Integer,
String

Boolean

AddSubMenuExists

lViewID,
szMenuName,
szSubMenuName,
lItemCount

Long Integer,
String,
String,
Long Integer

Boolean

DeleteAuxCommand

szCommandName

String

Long Integer

RemoveAuxCommandFromMenus

lViewID,
szCommandName

Long Integer,
String

Long Integer

RemoveAuxCommandFromToolbar

lViewID,
szCommandName

Long Integer,
String

Long Integer

RemoveAuxCommandFromToolsMenu

lViewID,
szCommandName

Long Integer,
String

Long Integer

RemoveAuxSubMenu

lViewID,
szMenuName,
szSubMenuName

Long Integer,
String,
String

Long Integer

AddAuxCommand Method

Description    Creates an auxiliary command that can be added later to the Tools menu or the standard toolbar of a specified view to begin execution of a program outside of ACT! Use this method before you use the AddAuxCommandToToolsMenu method or the AddAuxCommandToToolbar method. This method returns one of the following: S_OK, S_INVALID_INPUT, or S_DUPLICATE.

Objects          Command

Syntax            object.AddAuxCommand (szCommandName, szCommandLine, szStartIn, szToolTip, szDescription, szSmallIconPath, szLargeIconPath, iRunState)

Parameters    szCommandName   String that uniquely identifies the command. The command name must be unique; two commands cannot have the same name.

szCommandLine     String that specifies the command to be executed.

szStartIn                String that specifies the folder containing the data files associated with the command.

szToolTip               String that specifies the tool tip text displayed for the command.

szDescription         String that describes the command.

szSmallIconPath    String specifying the path of an icon file that contains a 16 x 16 button image for the command when small buttons are used.

szLargeIconPath    String specifying the path of an icon file that contains a 32 x 32 button image for the command when large buttons are used.

iRunState               Short integer that specifies the initial state of the window.

                              The following table lists the value for each state:

Value

State

0

Run the window in the background

1

Normal

2

Maximize the window

 

Return type   Long Integer

Example         'This example adds custom command CMDTEST

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

'Add custom command Test.exe to run in the normal state

ret = objCommands.AddAuxCommand("CMDTEST", "c:\SDKTest\Test.exe",

   "c:\SDKTest","MyTooltip", "Tests Description", "c\Test\small.ico",

   "c:\Test\large.ico", 1)

 

If ret <> 0 Then

   List1.AddItem "Error adding custom command "

Else: List1.AddItem "Custom command added successfully"

End If

 

'Clear the object

Set objCommands = Nothing

AddAuxCommandEnabled Method (requires ACT! 2000 version 5.0.2 or later)

Description    Creates an auxiliary command that can be added later to a menu or the standard toolbar of a specified view to begin execution of a program outside of ACT! Use this method before you use the AddAuxCommandToMenu, AddAuxCommandToToolsMenu, or the AddAuxCommandToToolbar method. This method returns one of the following: S_OK, S_INVALID_INPUT, or S_DUPLICATE.

Note: Use this method instead of AddAuxCommand when you need to set the enabled/disabled status of an added command. The AddAuxCommand command always enables an added command. Using AddAuxCommandEnabled, you can set the enabled status of an added command to that of a specified pre-defined ACT! command. For example, the pre-defined Copy command is enabled only if text is selected to copy. You could set the enabled status of a custom command to the status of the Copy command (Command ID 303).

Objects          Command

Syntax            object.AddAuxCommandEnabled (szCommandName, szCommandLine, szStartIn, szToolTip, szDescription, szSmallIconPath, szLargeIconPath, iRunState, iCommandID)

Parameters    szCommandName   String that uniquely identifies the command. The command name must be unique; two commands cannot have the same name.

szCommandLine     String that specifies the command to be executed.

szStartIn                String that specifies the folder containing the data files associated with the command.

szToolTip               String that specifies the tool tip text displayed for the command.

szDescription         String that describes the command.

szSmallIconPath    String specifying the path of an icon file that contains a 16 x 16 button image for the command when small buttons are used.

szLargeIconPath    String specifying the path of an icon file that contains a 32 x 32 button image for the command when large buttons are used.

iRunState               Short integer that specifies the initial state of the window.

The following table lists the value for each state:

Value

State

0

Run the window in the background

1

Normal

2

Maximize the window

 

iCommandID          Short integer that specifies the Command ID of a predefined command whose enabled status is used to set the status of the added command.

Note: Do not use Command ID 104 (File > Save) because the Save command is disabled before another command is executed.

                              For a list of values for this parameter, see the ACT! Command ID Reference appendix.

Return type   Long Integer

Example         'This example adds a command that is linked to Edit > Paste

 

Dim objAuxCmd As Object

Dim ret As Long

Set objAuxCmd = CreateObject("ACTOLE.AUXCMDS")

 

szCommandName = "Sample Command"

szCommandLine = "c:\SDKTest\Test.exe"

szStartIn = "c:\SDKTest"

szToolTip = "Tool Tip"

szDescription = "Description"

szSmallIconPath = "small.ico"

szLargeIconPath = "large.ico"

iRunState = 2       'Maximized

iCommandID = 304    'Edit > Paste

ret = objAuxCmd.AddAuxCommandEnabled(szCommandName, szCommandLine,

   szStartIn, szToolTip, szDescription, szSmallIconPath, szLargeIconPath,

   iRunState, iCommandID)

AddAuxCommandToMenu Method (requires ACT! 2000 version 5.0.2 or later)

Description    Adds the specified command to a menu or a submenu of a specific view. Before using this method you must have added the command using the AddAuxCommand method. You can use this method multiple times to insert a group of commands on a menu. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, S_NOT_FOUND, or S_DUPLICATE.

Objects          Command

Syntax            object.AddAuxCommandToMenu (lViewID, szMenuName, lPosition, lSeparator, szCommandName)

Parameters    lViewID                  Long integer specifying the view in which the specified command will be added to the specified menu.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szMenuName         String that identifies the menu and optionally the submenu to contain the added command. The value must match the name of a menu in the specified view. Specify a menu name and submenu name in the following format:

                              MenuName\SubMenuName

lPosition                Long integer specifying the index number of the menu item before which to insert the added command, in the range from 0 to the total number of items in the menu. (Separators are not considered as items.) Specify 0 to insert the command at the top of the menu. Specify the value for the total number of items in the menu to insert the command at the bottom of the menu. You can specify ‑1 to always append the command to the bottom of a menu.

lSeparator             Long integer specifying the placement of separators around the added command(s).

                              The following table lists the values for this parameter:

Value

Placement

 

Value

Placement

0

No separator

 

3

Top and bottom separators

1

Top separator

 

-1

Adds separators at the top and bottom of a group of adjacent added commands

2

Bottom separator

 

 

 

Note: If you are adding a group of commands and submenus with separators at the top and bottom of the group, specify a value of –1 for this parameter when adding each command in the group.

szCommandName   String that uniquely identifies the command. The command name must be unique; two commands cannot have the same name. A command name can be used only once per view.

Return type   Long Integer

Example         'This example adds a command to a submenu

 

Dim objAuxCmd As Object

Dim ret As Long

Set objAuxCmd = CreateObject("ACTOLE.AUXCMDS")

 

szCommandName = "Sample Command"

If objAuxCmd.AuxCommandExists(szCommandName) Then

   lViewID = 1         'Contact view

   szMenuName = "Edit"

   lPosition = -1      'append submenu to bottom

   lSeparator = 1      'top separator

   szSubMenuName = "Sample Submenu"

   ret = objAuxCmd.AddAuxSubMenu(lViewID, szMenuName, lPosition, lSeparator,

       szSubMenuName)

   If objAuxCmd.AuxSubMenuExists(lViewID, szMenuName, szSubMenuName,

       lCmdCount) Then

       ret = objAuxCmd.AddAuxCommandToMenu(lViewID, szMenuName & "\" &

          szSubMenuName, lPosition, lSeparator, szCommandName)

   End If

End If

AddAuxCommandToToolbar Method

Description    Adds the specified command button to the standard toolbar of a specified view. Before using this method you must have added the command using the AddAuxCommand method. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, S_NOT_FOUND, or S_DUPLICATE.

Objects          Command

Syntax            object.AddAuxCommandToToolbar (lViewID, szCommandName)

Parameters    lViewID                  Long integer that specifies the view.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   Unique name that specifies the command to be added. The command name must be unique; two commands cannot have the same name. A command name can be used only once per view.

Return type   Long Integer

Example         'This example adds a command to the toolbar in the Contact view

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

'Check if the command exists, only then add it to the toolbar

If objCommands.AuxCommandExists("CMDTEST") Then

 

   ret = objCommands.AddAuxCommandToToolbar(1, "CMDTEST")

 

   If ret = 0 Then List1.AddItem "Command successfully added to toolbar "

   Else: List1.AddItem "Error adding the command to the toolbar"

Else

   List1.AddItem "The Command does not exist. Please use the method

       AddAuxCommand first!"

End If

 

Set objCommands = Nothing

AddAuxCommandToToolsMenu Method

Description    Adds the specified command to the Tools menu of a specific view. Before using this method you must have added the command using the AddAuxCommand method. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, S_NOT_FOUND, or S_DUPLICATE.

Objects          Command

Syntax            object.AddAuxCommandToToolsMenu (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view in which the specified command will be added to the Tools menu.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   String that uniquely identifies the command. The command name must be unique; two commands cannot have the same name.

Return type   Long Integer

Example         'This example adds custom command CMDTEST to the Tools menu in the

'Group view

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

'Check if the command exists, and only then add it to the Tools menu

If objCommands.AuxCommandExists("CMDTEST") Then

 

   ret = objCommands.AddAuxCommandToToolsMenu(3, "CMDTEST")

   If ret = 0 Then list1.AddItem "Command successfully added to Tools menu!

       Please restart ACT! to see the results"

   Else: List1.AddItem "Error adding the command to the Tools menu"

End If

'Clear the Commands object

Set objCommands = Nothing

AddAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later)

Description    Adds the specified menu or submenu (cascading menu) to a menu of a specific view. You can use this method multiple times to insert a group of submenus on a menu. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, S_NOT_FOUND, or S_DUPLICATE.

Objects          Command

Syntax            object.AddAuxSubMenu (lViewID, szMenuName, lPosition, lSeparator, szSubMenuName)

Parameters    lViewID                  Long integer specifying the view in which the specified menu or submenu will be added.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szMenuName         String that identifies the menu to contain the added submenu. The value must match the name of a menu in the specified view. Specify a null value to add a menu to the menu bar.

lPosition                When adding a menu to the menu bar:
Long integer specifying the index number of the menu (left to right) before which to insert the menu, in the range from 0 to the total number of menus. Specify 0 to insert a menu to the left of existing menus. Specify the value for the total number of menus to insert the menu to the right of existing menus. You can specify ‑1 to always append the menu to the right of existing menus.

                              When adding a submenu to a menu:
Long integer specifying the index number of the menu item before which to insert the added submenu, in the range from 0 to the total number of items in the menu. (Separators are not considered as items.) Specify 0 to insert a submenu at the top of the menu. Specify the value for the total number of items in the menu to insert the submenu at the bottom of the menu. You can specify ‑1 to always append the submenu to the bottom of a menu.

lSeparator             Long integer specifying the placement of separators around the added submenu(s).

                              The following table lists the values for this parameter:

Value

Placement

 

Value

Placement

0

No separator

 

3

Top and bottom separators

1

Top separator

 

-1

Adds separators at the top and bottom of a group of adjacent added submenus

2

Bottom separator

 

 

 

Note: If you are adding a group of commands and submenus with separators at the top and bottom of the group, specify a value of –1 for this parameter when adding each submenu in the group.

szSubMenuName   String that uniquely identifies the menu or submenu. The menu or submenu name must be unique; two menus or submenus cannot have the same name.

Return type   Long Integer

Example         See AddAuxCommandToMenu

AuxCommandExists Method

Description    Determines if an auxiliary command with the specified name exists. Returns True (non-zero) if the command exists or False (zero) if the command does not exist.

Objects          Command

Syntax            object.AuxCommandExists (szCommandName)

Parameters    szCommandName   Unique name of the auxiliary command.

Return type   Boolean

AuxCommandExistsInMenus Method (requires ACT! 2000 version 5.0.2 or later)

Description    Determines if a command with the specified name exists in any menu of the specified view. Use this method to verify if a command exists before deleting it. This method returns True (non-zero) is the specified command exists or False (zero) if the command does not exist.

Objects          Command

Syntax            object.AuxCommandExistsInMenus (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view for the specified command.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   String that uniquely identifies a command to determine if it exists in any menu of the specified view.

Return type   Boolean

Example         See AddAuxCommandToMenu, RemoveAuxCommandFromMenus

AuxCommandExistsInToolbar Method

Description    Checks for the existence of the specified command in the toolbar for the specified view. Returns True (non-zero) if the command exists or False (zero) if the command does not exist.

Objects          Command

Syntax            object.AuxCommandExistsInToolbar(lViewID, szCommandName)

Parameters    lViewID                  Long integer indicating the view.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   Unique name that identifies the command to be found.

Return type   Boolean

AuxCommandExistsInToolsMenu Method

Description    Checks for existence of the specified command in the Tools drop-down menu of the specified view. Returns True (non-zero) if the command exists or False (zero) if the command does not exist.

Objects          Command

Syntax            object.AuxCommandExistsInToolsMenu (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   Unique name that specifies the command to search for.

Return type   Boolean

AuxSubMenuExists Method (requires ACT! 2000 version 5.0.2 or later)

Description    Returns the number of menu items contained in a menu or submenu. Use this method to verify if a menu or submenu exists and the number of items it contains before deleting it. This method returns True is the specified menu or submenu exists or False if not.

Objects          Command

Syntax            object.AddSubMenuExists (lViewID, szMenuName, szSubMenuName, lItemCount)

Parameters    lViewID                  Long integer specifying the view for the specified menu or submenu.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szMenuName         String that identifies the menu that contains the submenu. The value must match the name of a menu in the specified view. Specify a null value to check for a menu in the menu bar.

szSubMenuName   String that identifies the menu or submenu to check if it exists and the number of items it contains. The value must match the name of a menu or submenu in the specified menu in the specified view.

lItemCount             Reference to a variable that receives a long integer value representing the number of items contained in the specified menu or submenu. A value of 0 is received if the menu or submenu does not exist or if it contains no menu items.

Return type   Boolean

Example         See AddAuxCommandToMenu, RemoveAuxSubMenu

DeleteAuxCommand Method

Description    Deletes an existing auxiliary command and any associated toolbar and menu items. This method returns one of the following: S_OK, S_NOT_FOUND.

Objects          Command

Syntax            object.DeleteAuxCommand (szCommandName)

Parameters    szCommandName   Unique name of the auxiliary command to delete.

Return type   Long Integer

Example         'This example completely deletes the specified custom command

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

ret = objCommands.DeleteAuxCommand("CMDTEST")

If ret <>0 Then

   lstDisplay.AddItem sCommandName & " could not be deleted ."

End If

 

'Clear the Commands object

Set objCommands = Nothing

RemoveAuxCommandFromMenus Method (requires ACT! 2000 version 5.0.2 or later)

Description    Removes the specified command from a menu of a specified view. Use AuxCommandExistsInMenus before using this method to verify that the command to be removed exists. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, or S_NOT_FOUND.

Objects          Command

Syntax            object.RemoveAuxCommandFromMenus (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view in which the specified command will be removed.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   String that uniquely identifies the command to remove. The value must match the name of a command in a menu in the specified view.

Return type   Long Integer

Example         This example removes a command from a menu in the Contact view if it exists

Dim objAuxCmd As Object

Dim ret As Long

Set objAuxCmd = CreateObject("ACTOLE.AUXCMDS")

 

lViewID = 1     'Contact view

szCommandName = "Sample Command"

If objAuxCmd.AuxCommandExistsInMenus(lViewID, szCommandName) Then

   ret = objAuxCmd.RemoveAuxCommandFromMenus(lViewID, szCommandName)

End If

RemoveAuxCommandFromToolbar Method

Description    Removes the specified command button from the toolbar of a specified view. This method only deletes the specified command from the toolbar. Use the DeleteAuxCommand method to delete the command. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, or S_NOT_FOUND.

Objects          Command

Syntax            object.RemoveAuxCommandFromToolbar (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   Unique name that identifies the command to be removed.

Return type   Long Integer

Example         'This example removes the CMDTEST command from the toolbar of the

'Contact view

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

'If the Command exists in the toolbar, then remove it from the toolbar

If (objCommands.AuxCommandExistsInToolbar(1, "CMDTEST")) Then

   ret = objCommands.RemoveAuxCommandFromToolbar(1, "CMDTEST")

Else

   lstDisplay.AddItem sCommandName & " does not exist in the toolbar in the

       view selected, please try again"

End If

 

'Clear the commands object

Set objCommands = Nothing

RemoveAuxCommandFromToolsMenu Method

Description    Removes the specified command name from the Tools menu of a specified view. This method only deletes the specified command from the Tools menu. Use the DeleteAuxCommand method to delete the command. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, or S_NOT_FOUND.

Objects          Command

Syntax            object.RemoveAuxCommandFromToolsMenu (lViewID, szCommandName)

Parameters    lViewID                  Long integer specifying the view.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szCommandName   Unique name that identifies the command to be removed.

Return type   Long Integer

Example         'This example removes the requested command from the Tools menu of the

'selected view

 

Dim objCommands As Object

Dim ret As Long

 

'Create the Commands object

Set objCommands = CreateObject("ACTOLE.AUXCMDS")

 

'If the command exists in the toolbar, then remove it from the toolbar

If (objCommands.AuxCommandExistsInToolsMenu(3, "CMDTEST")) Then

   ret = objCommands.RemoveAuxCommandFromToolsMenu(3, "CMDTEST")

 

Else

   lstDisplay.AddItem sCommandName & " does not exist in the toolbar in the

       view selected, please try again"

End If

 

Set objCommands = Nothing

RemoveAuxSubMenu Method (requires ACT! 2000 version 5.0.2 or later)

Description    Removes the specified menu or submenu of a specific view. Use AuxSubMenuExists before using this method to verify the number of menu items in the menu or submenu to be removed. This method returns one of the following: S_OK, S_INVALID_ID, S_INVALID_INPUT, or S_NOT_FOUND.

Objects          Command

Syntax            object.RemoveAuxSubMenu (lViewID, szMenuName, szSubMenuName)

Parameters    lViewID                  Long integer specifying the view in which the specified menu or submenu will be removed.

                              The following table lists the value for each view:

Value

Target View

 

Value

Target View

0

Startup View (the view displayed when a database is not open)

 

4

Task List View

1

Contact View

 

5

All Calendar Views

2

Contact List View

 

6

Email View

3

Groups View

 

 

 

 

szMenuName         String that identifies the menu containing the submenu to remove. The value must match the name of a menu in the specified view. Specify a null value to remove a menu in the menu bar.

szSubMenuName   String that identifies the menu or submenu to remove. The value must match the name of a menu or submenu in the specified menu in the specified view.

Return type   Long Integer

Example         This example removes a submenu from the Contact view if it exists

Dim objAuxCmd As Object

Dim ret As Long

Set objAuxCmd = CreateObject("ACTOLE.AUXCMDS")

 

lViewID = 1         'Contact view

szMenuName = "Edit"

szSubMenuName = "Sample Submenu"

If objAuxCmd.AuxSubMenuExists(lViewID, szMenuName, szSubMenuName, lCmdCount)

   Then

   ret = objAuxCmd.RemoveAuxSubMenu(lViewID, szMenuName, szSubMenuName)

End If


CHAPTER

Adding Custom Commands to ACT! Error Codes

The following error codes apply only to the Adding Custom Commands to ACT! component of the ACT! SDK.

Value

Error code

Description

0

S_OK

Success

102

S_NOT_FOUND

Command or toolbar icon not defined

117

S_INVALID_INPUT

Required input parameter is 0 or null

134

S_MEM_ERROR

Limit of 300 added commands exceeded

157

S_DUPLICATE

Command being added already exists

163

S_INVALID_ID

Invalid View ID specified

 


A


ACT! Software Development Kit (SDK)
Technical Reference Guide

ACT! Database File Formats Reference appendix

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


CONTENTS

Appendix A    ACT! Database File Formats Reference

Overview of ACT! Database Files.................................................................................... 491

ACT! database table relationships....................................................................... 495

What’s New                                                                                                                           ...................................................................................................................... 496

Changes for ACT! 4.0......................................................................................... 496

Changes for ACT! 2000....................................................................................... 496

Looking at ACT! Database Tables................................................................................... 496

Activity table (.ADB) fields.................................................................................. 496

Contact table (.DBF) fields.................................................................................. 501

E-mail table (.EDB) fields................................................................................... 508

Group table (.GDB) fields.................................................................................... 509

List table (.DDB) fields (requires ACT! 2000 or later).............................................. 513

Notes/History table (.HDB) fields......................................................................... 514

Relational table (.REL) fields............................................................................... 517

Understanding the Relational table................................................................ 518

Sales table (.SDB) fields (ACT! 2000 or later)....................................................... 519


A

 
APPENDIX

ACT! Database File Formats Reference

This appendix describes the file formats of ACT!TM database tables and the relationships between the tables in ACT! 3.0 or later. It provides technical information on ACT! tables and the fields within records in each table. This information is provided to assist in developing applications that work with ACT! databases. Using the ACT! OLE Database Object is the recommended method of reading and writing information to ACT! databases.

Overview of ACT! Database Files

The ACT! database is a collection of files used to store information that is entered by the user. This collection of files consists of tables that store contact, group, activity, notes and history, e-mail, and other information. The Relational table stores links that allow this information to be accessible in associated tables within the ACT! application. ACT! 3.0 or later uses standard FoxPro formatted tables.

The following table describes ACT! database files based on their extensions.

Extension

Description

.ADB

Activity table

.ADX

Index file for the Activity (.ADB) table

.BLB

Binary Large Object Database (BLOB) file

.DBF

Contact table

.DDB

List table for the Sales (.SDB) table (in ACT! 2000 or later databases)

.DDF

Database definition file

.DDX

Index file for the List (.DDB) table (in ACT! 2000 or later databases)

.EDB

E-mail table

.EDX

Index file for the E-mail (.EDB) table

.GDB

Group table

.GDX

Index file for the Group (.GDB) table

.HDB

Notes/History table

.HDX

Index file for the Notes/History (.HDB) table

.LCK

Record locking file for ACT! multi-user databases

.MDX

Index file for the Contact (.DBF) table

.REL

Relational table for ACT! tables

.REM

Reminders file (in ACT! 2000 or later databases)

.REX

Index file for the Relational (.REL) table

.SDB

Sales table (in ACT! 2000 or later databases)

.SDX

Index file for the Sales (.SDB) table (in ACT! 2000 or later databases)

.TDB

Transaction synchronization log table

.TDX

Index file for the Transaction synchronization log (.TDB) table

.TLx

Record locking file for ACT! multi-user databases on a network, where x is the number of each subsequent file (TL1, TL2, and so on)

The following list provides brief descriptions of ACT! database tables and an overview of data relationships within ACT! tables.

Activity (.ADB)                                       Contains records for call, meeting, and to-do activities. Activity records are identified by a Unique ID and an activity type. Activity records are linked to contact records by Relational table records and to group records by a Unique ID.

Binary Large Object Database (.BLB)      Contains variable size data including attachment file and path names, database user information, drop-down list information, e‑mail addresses, notes and history regarding text, recurring activity information, and synchronization settings. ACT! database tables contain references as links to a Binary Large Object Database file.

Contact (.DBF)                                        Contains contact information. Contact records are identified by a Unique ID and linked with an ACT! database user by the User Name.

Database Definition File (.DDF)                Stores field definition information including mapping of ACT! field names to ACT! database schema names, index file structures, and references to drop-down list items in the Binary Large Object Database (.BLOB) file.

E-mail (.EDB)                                          Contains the e-mail address and e-mail system information that is displayed in the Contact window. E-mail records are identified and linked to contact records by the Contact Unique ID field. E-mail addresses are stored in the Binary Large Object Database file.

Group (.GDB)                                          In ACT! 3.0 or later, contains separate records each with their own histories, notes, and attachments. Group records are identified by a Unique ID and linked with an ACT! database user by the User Name. Group records are linked to contact records by records in the Relational table.

List (.DDB)                                             In ACT! 2000 or later, contains product, product type, and main competitor data linked to the Sales table. The Sales table stores a Unique ID for the field containing each of these three types of data. List records are identified and linked to sales records by the List table Unique ID field.

Notes/History (.HDB)                              Contains notes, histories, and attachments. Note, history, and attachment records are identified by a Unique ID. Notes/History records and attachments are linked to contact and group records by Unique ID fields in Notes/History table records.

Record locking file (.LCK)                        The Record locking file for ACT! multi-user databases.

Relational table (.REL)                             The Relational table is used in ACT! 3.0 or later to link contact, group, and activity table records.

Reminders file (.REM)                             Contains ACT! reminders data supplied by the system.

Sales (.SDB)                                            In ACT! 2000 or later, contains sales information. Sales records are identified by a Unique ID. Sales records are linked to contact and group records and data in the List table by Unique ID fields in Sales table records.

Transaction Synchronization Log (.TDB)   Records the fields that are changed in an ACT! database and the date and the time of the change for synchronization with another database.

ACT! database table relationships

The following diagram shows each table in an ACT! and shows how these tables are linked, including links to the Relational table.

ACT! database table fields also link to data stored in the Binary Large Object Database (BLOB) file.

The Unique ID field contains a 12 character value that is derived from the current date and time, then translated into a unique sequence of alphanumeric and special characters that can be displayed.


What’s New

This section describes changes for ACT! 4.0 and ACT! 2000.

Changes for ACT! 4.0

The Ticker Symbol field in the Contact table and record type 102 for the new E-mail record type in the Notes/History table have been added for ACT! 4.0. Indexes have been added for the additional Company and Phone columns in the Task List. In ACT! 4.0, the E-mail system is a preference and is stored in the Windows registry instead of being stored in the E-mail table as in ACT! 3.0.

Changes for ACT! 2000

The List table, Sales table, and the Reminders file have been added for ACT! 2000. The following fields have been added to the Activity table: Details, External Id, and Record Status. The following fields have been added to the Group table: Group Level, Industry, Number of Employees, Parent ID, Referred By, Region, Revenue, SIC Code, Ticker Symbol, and Web Site.


Looking at ACT! Database Tables

The tables in this section show database schema information for each field in every ACT! database table. This includes field names, database schema names, field formats, and field lengths. The tables also show the field ID values and the corresponding field constants to use to read and write data to ACT! database fields using the ACT! OLE Database Object and the ACT! OLE Application Object.

Added user-defined fields start numbering at Unique ID type 1000. Also, any field whose Unique ID type is between 200 and 999 is a virtual field that is read-only. Virtual fields reference a calculated value, a portion of a field in the same table, or a field in another table of file.

Activity table (.ADB) fields

The following table shows database schema information for each field in an ACT! database Activity table.

Field name

Database
schema name

Format/
Length

Field
ID

Field constant

Description

Alarm Status

ALRMSTATUS

Num
1

33

AF_AlarmStatus

Alarm status for the activity.
Values are:
0  Alarm is set to off
1  Alarm is set to on

Banner Color

BANNER_CLR

Num
10

34

AF_BannerColor

Code for the activity color.
Default values are:
Black   Low-priority
Blue     Medium-priority
Red      High-priority

Cleared Status

CLEARED

Num
1

41

AF_ClearedStatus

Specifies if the activity was cleared.
Values are:
Blank   Not cleared
1           Cleared

Contact Count

CONT_CNT

Num
6

100

AF_TotalInActivity

Total number of contacts with whom the activity is scheduled. This field is supplied by the system.

Create Timestamp

CTIME

Char
6

2

AF_CreateTimestamp

Date and time the activity record was created. This field is supplied by the system and stored in a compressed format.

Date/Time
(“Date” and “Time” display)

START_TIME

Char
12

28

AF_StartTime

Start date and time of the activity. The format is YYYYMMDDHHMM. The default is the current system date and time.

Details

DETAILS

Char
6

45

AF_Details

Contains a description of the details associated with the activity for ACT! 2000 or later databases only. This 6-byte field is supplied by the system and contains a reference to a field in the Binary Large Object Database file that contains a maximum of 32,768 characters.

Duration

DURATION

Num
10

30

AF_Duration

Duration of the activity in minutes.

Edit Timestamp

ETIME

Char
6

3

AF_EditTimestamp

Date and time the activity record was last modified. The initial value is the date and time the activity record was created. This field is supplied by the system and stored in a compressed format.

E-mail Status

EML_STATUS

Num
1

35

AF_EmailStatus

Specifies if an e-mail reminder will be sent for the activity.
Values are:
0  No reminder will be sent
1  A reminder will be sent

End Time

END_TIME

Char
12

29

AF_EndTime

Calculated end date and time for the activity. The format is YYYYMMDDHHMM. This field is supplied by the system.

Exception Date

EXCEPTDATE

Char
12

44

AF_ExceptionDate

Original date of an exception instance of a recurring activity. The format is YYYYMMDDHHMM.

External Id

EXTERNID

Char
48

47

AF_ExternalId

Contains the record ID of an activity record in an external database (Outlook) in ACT! 2000 or later databases only.

Group

GROUPID

Char
12

39

AF_GroupId

The Unique ID of the group record to which the activity record is associated. This field is supplied by the system.

Lead Time

LEAD_TIME

Num
10

32

AF_LeadTime

Advance notice for the activity alarm in minutes. The default lead time for the activity is used if the alarm is not set.

Merge Timestamp

MTIME

Char
6

4

AF_MergeTimestamp

Date and time the activity record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Priority

PRIORITY

Num
1

26

AF_Priority

Priority of the activity.
Values are:
0  High
1  Medium
2  Low

Public/Private

PUB_STATUS

Num
1

5

AF_PublicPrivate

Specifies if the activity is public or private.
Values are:
1  Public
2  Private

Record Status

RECSTATUS

Num
2

46

AF_RecordStatus

Specifies if the record was imported from or exported to an external database (Outlook), in ACT! 2000 or later databases only.

Recurring Exceptions

EXCEPTIONS

Char
6

43

AF_Exceptions

A list of dates for exception instances of a recurring activity. This 6-byte field is supplied by the system and contains a reference to data stored in the Binary Large Object Database file.

Recurring Identifier

RECURID

Char
12

42

AF_RecurringId

For recurring activities, contains the Unique ID of the parent activity if this instance of the recurring activity has been changed. Otherwise this field is blank. This field is supplied by the system.

Recurring Map

RECURRING

Char
18

36

AF_Recurring

Recurring activity settings of:
once (default), daily, weekly, monthly, or custom.

Regarding

REGARDING

Char
70

27

AF_Regarding

Description of the activity.

Scheduled By

SCHEDL_BY

Char
12

38

AF_ScheduledBy

User ID of the database user who scheduled the activity. The default is the logged-on user. This field is supplied by the system.

Scheduled Date

Char
8

200

AVF_ScheduledDate

Date portion of the date and time for which the activity is scheduled. The format is YYYYMMDD. This field references the Date/Time field and is read-only.

Scheduled For

SCHEDL_FOR

Char
12

37

AF_ScheduledFor

User ID of the database user for whom the activity is scheduled. The default is the logged-on user. This field is supplied by the system.

Scheduled Time

Char
4

201

AVF_ScheduledTime

Time portion of the date and time for which the activity is scheduled. The format is HHMM. This field references the Date/Time field and is read-only.

Scheduled With

SCHEDLWITH

Char
12

40

AF_FirstScheduledWith

User ID of the contact displayed in the Calendar, Activities tab, and Task List for the activity. This field is supplied by the system.

Timeless Status

TM_STATUS

Num
1

31

AF_TimelessStatus

Timeless status for the start time of the activity.
Values are:
0  Not timeless
1  Timeless

Total Duration

TDURATION

Num
6

101

AF_TotalDuration

Total number of minutes from the start time of the first instance of the activity to the ending time of the last instance of the activity, minus one minute.

Type

TYPE

Num
2

25

AF_Type

Activity record type.
Values are:
0  Call
1  Meeting
2  To-do

Unique Id

UNIQUE_ID

Char
12

1

AF_UniqueID

Unique activity record identification number. This field is supplied by the system.


Contact table (.DBF) fields

The following table shows database schema and Contact window information for each field in an ACT! database Contact table.

Field name

Database
schema name

Format/
Length

Field
ID

Field
constant

Description

2nd Contact

NAME2

Char
50

72

CF_Name2

Second contact’s name.

2nd Last Reach
(not displayed unless added in the Layout Designer)

ALT1REACH

Char
8

92

CF_Alt1Reach

Date of the last completed call to the second contact. The format is YYYYMMDD. This field is supplied by the system.

2nd Phone

PHONE2

Char
42

74

CF_Phone2

Second contact’s phone number.

2nd Phone Ext.
(“Ext.” displays)

PHONE2_EXT

Char
8

83

CF_Phone2Ext

Extension for the second contact’s phone number.

2nd Title

TITLE2

Char
50

73

CF_Title2

Second contact’s title.

3rd Contact

NAME3

Char
50

75

CF_Name3

Third contact’s name.

3rd Last Reach
(not displayed unless added in the Layout Designer)

ALT2REACH

Char
8

93

CF_Alt2Reach

Date of the last completed call to the third contact. The format is YYYYMMDD. This field is supplied by the system.

3rd Phone

PHONE3

Char
42

77

CF_Phone3

Third contact’s phone number.

3rd Phone Ext.
(“Ext.” displays)

PHONE3_EXT

Char
8

84

CF_Phone3Ext

Extension for the third contact’s phone number.

3rd Title

TITLE3

Char
50

76

CF_Title3

Third contact’s title.

Address 1
(“Address” displays)

ADDR1

Char
50

27

CF_Address1

First line of the contact’s primary address.

Address 2
(label is not displayed)

ADDR2

Char
30

28

CF_Address2

Second line of the contact’s primary address.

Address 3
(label is not displayed)

ADDR3

Char
30

29

CF_Address3

Third line of the contact’s primary address.

Alt Phone

ALTPHONE

Char
42

71

CF_AltPhone

Contact’s alternate phone number.

Alt Phone Ext.
(“Ext.” displays)

ALTEXT

Char
8

82

CF_AltPhoneExt

Extension for the contact’s alternate phone number.

Assistant

ASSISTANT

Char
50

47

CF_Assistant

Name of the contact’s assistant.

Asst. Phone

ASST_PHONE

Char
42

86

CF_AsstPhone

Phone number of the contact’s assistant.

Asst. Phone Ext.
(“Ext.” displays)

ASST_EXT

Char
8

87

CF_AsstExt

Extension for the phone number of the contact’s assistant.

Asst. Title

ASST_TITLE

Char
50

85

CF_AsstTitle

Title of the contact’s assistant.

City

CITY

Char
30

30

CF_City

City in the contact’s address.

Company

COMPANY

Char
50

25

CF_Company

Contact’s company name.

Contact

NAME

Char
50

26

CF_Name

Contact’s name.

Contact Type

CONT_TYPE

Num
1

125

CF_ContactType

Contact record type.
Values are:
blank, 0, or 1 for normal
2 for “My Record”

Country

COUNTRY

Char
25

33

CF_Country

Country in the contact’s address.

Create Timestamp
(“Create Date” displays)

CTIME

Char
6

2

CF_CreateTimestamp

Date and time the contact record was created. This field is supplied by the system and stored in a compressed format.

Department

DEPARTMENT

Char
50

88

CF_Department

Contact’s department.

Edit Timestamp
(“Edit Date” displays)

ETIME

Char
6

3

CF_EditTimestamp

Date and time the contact record was last modified. This field is supplied by the system and stored in a compressed format.

Email Address

Char

200

CVF_EmailAddress

The primary e-mail address for the contact. This field references the Logon field in the E-mail table for ACT! 4.0 or later databases only and is read-only.

Email Carrier

Char
128

203

CVF_EmailCarrier

The e-mail Carrier portion of the primary e-mail address for the contact. This field references the Carrier field in the E-mail table for ACT! 3.0 databases only and is read-only.

Email Logon

Char

202

CVF_EmailLogon

The e-mail Logon portion of the primary e-mail address for the contact. This field references the Logon field in the E-mail table for ACT! 3.0 databases only and is read-only.

Fax

FAX

Char
42

36

CF_Fax

Contact’s fax number.

Fax Ext.
(not displayed unless added in the Layout Designer)

FAX_EXT

Char
8

81

CF_FaxExt

Extension for the contact’s fax number.

First Name
(not displayed unless added in the Layout Designer)

FNAME

Char
50

78

CF_FirstName

Contact’s first name. This field is parsed by the system from the contact.

Home Address 1

ALTADDR1

Char
50

65

CF_AltAddress1

First line of the contact’s home address.

Home Address 2

ALTADDR2

Char
30

66

CF_AltAddress2

Second line of the contact’s home address.

Home City

ALTCITY

Char
30

67

CF_AltCity

City in the contact’s home address.

Home Country

ALTCOUNTRY

Char
25

70

CF_AltCountry

Country in the contact’s home address.

Home Phone

HOME_PHONE

Char
42

37

CF_HomePhone

Contact’s home phone number.

Home State

ALTSTATE

Char
20

68

CF_AltState

State in the contact’s home address.

Home Zip

ALTZIP

Char
10

69

CF_AltZip

ZIP code in the contact’s home address.

ID/Status

IDSTATUS

Char
25

34

CF_IDStatus

Category assigned to the contact.

Last Attempt

LAST_ATMPT

Char
8

43

CF_LastAttempt

Date of the last attempt to call the contact. The format is YYYYMMDD. This field is supplied by the system.

Last Meeting

LAST_MEET

Char
8

41

CF_LastMeet

Date of the last meeting with the contact. The format is YYYYMMDD. This field is supplied by the system.

Last Name
(not displayed unless added in the Layout Designer)

LNAME

Char
50

79

CF_LastName

Contact’s last name. This field is parsed by the system from the contact name.

Last Reach

LAST_REACH

Char
8

42

CF_LastReach

Date of the last completed call to the contact. The format is YYYYMMDD. This field is supplied by the system.

Last Results

LAST_RSLTS

Char
75

48

CF_LastResults

Comments on the last results with the contact.

Letter Date

LTTR_DATE

Char
8

44

CF_LetterDate

Date of the last letter sent to the contact. The format is YYYYMMDD. This field is supplied by the system.

Merge Timestamp
(“Merge Date” displays)

MTIME

Char
6

4

CF_MergeTimestamp

Date and time the contact record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Mobile Phone

MOBILPHONE

Char
42

38

CF_MobilePhone

Contact’s mobile phone number.

Note

Char

201

CVF_Note

This field is obsolete and is supplied for backward-compatibility with ACT! 2.0 databases.

Owner
(not displayed unless added in the Layout Designer)

OWNER

Char
50

91

CF_UsersCompany

The company name of the database user who created the contact record.

Pager

PAGER

Char
42

39

CF_Pager

Contact’s pager number.

Phone

PHONE

Char
42

35

CF_Phone

Contact’s primary phone number.

Phone Ext.
(“Ext.” displays)

EXT

Char
8

80

CF_Ext

Extension for the contact’s primary phone number.

Public/Private

PUB_STATUS

Num
1

5

CF_PublicPrivate

Access level for the contact.
Values are:
1  Public (default)
2  Private

Record Creator

CREATOR

Char
50

90

CF_Creator

The database user who created the contact record. This field is supplied by the system.

Record Manager

USER

Char
12

6

CF_RecordManager

The Unique ID of the database user permitted to access and change the status of private contacts. This field is supplied by the system.

Referred By

REFER_BY

Char
30

49

CF_ReferredBy

Description of the contact’s referral source.

Salutation

SALUTATION

Char
30

40

CF_Salutation

Contact’s letter salutation or greeting name.

Spouse

SPOUSE

Char
50

89

CF_Spouse

Name of the contact’s spouse.

State

STATE

Char
20

31

CF_State

State in the contact’s address.

Ticker Symbol

TICKERSYM

Char
12

95

CF_TickerSymbol

Company’s stock ticker symbol for ACT! 4.0 or later databases only.

Title

TITLE

Char
50

46

CF_Title

Contact’s title.

Unique Id

UNIQUE_ID

Char
12

1

CF_UniqueID

Unique contact record identification number. This field is supplied by the system.

User 1

USER1

Char
50

50

CF_User1

User-definable field 1.

User 2

USER2

Char
50

51

CF_User2

User-definable field 2.

User 3

USER3

Char
50

52

CF_User3

User-definable field 3.

User 4

USER4

Char
50

53

CF_User4

User-definable field 4.

User 5

USER5

Char
50

54

CF_User5

User-definable field 5.

User 6

USER6

Char
50

55

CF_User6

User-definable field 6.

User 7

USER7

Char
75

56

CF_User7

User-definable field 7.

User 8

USER8

Char
75

57

CF_User8

User-definable field 8.

User 9

USER9

Char
75

58

CF_User9

User-definable field 9.

User 10

USER10

Char
50

59

CF_User10

User-definable field 10.

User 11

USER11

Char
50

60

CF_User11

User-definable field 11.

User 12

USER12

Char
50

61

CF_User12

User-definable field 12.

User 13

USER13

Char
50

62

CF_User13

User-definable field 13.

User 14

USER14

Char
50

63

CF_User14

User-definable field 14.

User 15

USER15

Char
50

64

CF_User15

User-definable field 15.

Web Site

URL

Char
75

94

CF_URL

Contact’s web site URL address.

Zip

ZIP

Char
10

32

CF_Zip

ZIP code in the contact’s address.


E-mail table (.EDB) fields

The following table shows database schema information for each field in an ACT! database E-mail table. An e-mail record is created for each e-mail address for a contact.

Field name

Database
schema name

Format/
Length

Field
ID

Field constant

Description

Contact

CONTACTID

Char
12

28

EF_ContactId

The Unique ID of the contact record with which the e-mail record is associated. This field is supplied by the system.

Create Timestamp

CTIME

Char
6

2

EF_CreateTimestamp

Date and time the e-mail record was created. This field is supplied by the system and stored in a compressed format.

Edit Timestamp

ETIME

Char
6

3

EF_EditTimestamp

Date and time the e-mail record was last modified. The initial value is the date and time the e-mail record was created. This field is supplied by the system and stored in a compressed format.

Logon

LOGON

Char
6

25

EF_Logon

The e-mail address. This 6-byte field is supplied by the system and contains a reference to the Binary Large Object Database file.

Carrier

CARRIER

Char
128

26

EF_Carrier
(not used in ACT! 4.0 or later)

The e-mail system for the e-mail address in this record. This field is blank in ACT! 4.0 or later databases. In ACT! 4.0 or later, the e-mail system is a preference and is stored in the Windows registry.

Merge Timestamp

MTIME

Char
6

4

EF_MergeTimestamp

Date and time the e-mail record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Primary Status

PRM_STATUS

Num
1

27

EF_PrimaryStatus

E-mail record status.
Values are:
0  Secondary e-mail address
1  Primary e-mail address

Unique Id

UNIQUE_ID

Char
12

1

EF_UniqueID

Unique e-mail record identification number. This field is supplied by the system.


Group table (.GDB) fields

The following table shows database schema and Group window information for each field in an ACT! database Group table.

Field name

Database
schema name

Format/
Length

Field
ID

Field constant

Description

Address 1

ADDR1

Char
50

27

GF_Address1

First line of the group’s address.

Address 2

ADDR2

Char
30

28

GF_Address2

Second line of the group’s address.

Address 3

ADDR3

Char
30

29

GF_Address3

Third line of the group’s address.

City

CITY

Char
30

30

GF_City

City in the group’s address.

Contact Count

CONT_CNT

Num
6

100

GF_TotalInGroup

Total number of contacts in the group.

Country

COUNTRY

Char
25

33

GF_Country

Country in the group’s address.

Create Timestamp
(“Create Date” displays)

CTIME

Char
6

2

GF_CreateTimestamp

Date and time the group record was created. This field is supplied by the system and stored in a compressed format.

Description

DESCRPTION

Char
100

40

GF_Description

Description of the group.

Division

DIVISION

Char
50

26

GF_Division

Division for the group.

Edit Timestamp
(“Edit Date” displays)

ETIME

Char
6

3

GF_EditTimestamp

Date and time the group record was last modified. This field is supplied by the system and stored in a compressed format.

Group Level

GRPLEVEL

Num
1

56

GF_GroupLevel

The level of the group (a parent group or a subgroup) for ACT! 2000 or later databases only.
Values are:
0  Parent group
1  Subgroup
This field is.

Group Name

GRP_NAME

Char
75

25

GF_Name

Name of the group.

Industry

INDUSTRY

Char
50

58

GF_Industry

Type of industry for the group for ACT! 2000 or later databases only.

Merge Timestamp
(“Merge Date” displays)

MTIME

Char
6

4

GF_MergeTimestamp

Date and time the group record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Note

Char

200

GVF_Note

This field is obsolete and is supplied for backward-compatibility with ACT! 2.0 databases.

Number of Employees

EMPLOY

Num
10

60

GF_Employees

Number of employees in the group for ACT! 2000 or later databases only.

Parent ID

PARENTID

Char
12

55

GF_ParentId

The Unique ID of the parent record of a subgroup record for ACT! 2000 or later databases only. This field is supplied by the system.

Parent Name

Char
75

201

GVF_ParentName

The group name of the parent record of a subgroup record for ACT! 2000 or later databases only. This field is retrieved from the Parent ID field and is read-only.

Priority

PRIORITY

Char
25

35

GF_Priority

User defined description of the group’s priority. Default selections are High, Medium, and Low.

Public/Private

PUB_STATUS

Num
1

5

GF_PublicPrivate

Access level for the group.
Values are:
1  Public (default)
2  Private

Record Creator

CREATOR

Char
50

54

GF_Creator

The database user who created the group record. This field is supplied by the system .

Record Manager

USER

Char
12

6

GF_RecordManager

The database user permitted to access and change the status of private groups.

Referred By

REFER_BY

Char
30

64

GF_ReferredBy

Description of the group’s referral source for ACT! 2000 or later databases only.

Region

REGION

Char
50

57

GF_Region

Description of the geographic region of the group for ACT! 2000 or later databases only.

Revenue

REVENUE

Num
19

61

GF_Revenue

Revenue for the group for ACT! 2000 or later databases only, stored with 5 digits to the right of the decimal point.

SIC Code

SICCODE

Char
20

59

GF_SicCode

SIC (Standard Industrial Classification) code for the group’s industry for ACT! 2000 or later databases only.

State

STATE

Char
20

31

GF_State

State in the group’s address.

Ticker Symbol

TICKERSYM

Char
12

63

GF_TickerSymbol

Group's stock ticker symbol for ACT! 2000 or later databases only.

Unique Id

UNIQUE_ID

Char
12

1

GF_UniqueID

Unique group record identification number. This field is supplied by the system.

User 1

USER1

Char
50

36

GF_User1

User-definable field 1.

User 2

USER2

Char
50

37

GF_User2

User-definable field 2.

User 3

USER3

Char
50

38

GF_User3

User-definable field 3.

User 4

USER4

Char
50

39

GF_User4

User-definable field 4.

User 5

USER5

Char
50

47

GF_User5

User-definable field 5.

User 6

USER6

Char
75

48

GF_User6

User-definable field 6.

Web Site

URL

Char
75

65

GF_URL

Group's web site URL address for ACT! 2000 or later databases only.

Zip

ZIP

Char
10

32

GF_Zip

ZIP code in the group’s address.


List table (.DDB) fields (requires ACT! 2000 or later)

The following table shows database schema for each field in an ACT! database List table. (Requires ACT! 2000 or later.)

Field name

Database
schema name

Format/
Length

Field
ID

Field
constant

Description

Create Timestamp

CTIME

Char
6

2

LTF_CreateTime

Date and time the list record was created. This field is supplied by the system and stored in a compressed format.

Directory Name

DIRNAME

Char
100

26

LTF_Name

Stores a drop-down list entry for a Product, Type or Main Competitor field referenced by a Unique ID in the Sales table.

Directory Type

DIRTYPE

Num
2

25

LTF_Type

Associates the Directory Name with one of three specific fields referenced by a Unique ID in the Sales table.
Values are:
1  Product
2  Type
3  Main Competitor

Edit Timestamp
(System field)

ETIME

Char
6

3

LTF_EditTime

Date and time the list record was last modified. The initial value is the date and time the record was created. This field is supplied by the system and stored in a compressed format.

Merge Timestamp
(System field)

MTIME

Char
6

4

LTF_MergeTime

Date and time the list record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Record Manager

USER

Char
12

6

LTF_UserId

Unique ID of the database user who created the list record. This field is supplied by the system.

Unique Id
(System field)

UNIQUE_ID

Char
12

1

LTF_UniqueID

Unique list record identification number. This field is supplied by the system.

Notes/History table (.HDB) fields

The following table shows database schema information for each field in an ACT! database Notes/History table.

Field name

Database
schema name

Format/
Length

Field
ID

Field
constant

Description

Attachment

ATTACHMENT

Char
6

28

NHF_Attachment

The drive, folder, and filename of the attached file. This 6-byte field is supplied by the system and contains a reference to a field in the Binary Large Object Database file that contains a maximum of 256 characters.

Contact

CONTACTID

Char
12

29

NHF_ContactId

The Unique ID of the contact record with which the history, notes, or attachment record is associated. This field is supplied by the system.

Create Timestamp

CTIME

Char
6

2

NHF_CreateTimestamp

Date and time the history, notes, or attachment record was created. This field is supplied by the system and stored in a compressed format.

Edit Timestamp

ETIME

Char
6

3

NHF_EditTimestamp

Date and time the history, notes, or attachment record was last modified. The initial value is the date and time the record was created. This field is supplied by the system and stored in a compressed format.

Group

GROUPID

Char
12

30

NHF_GroupId

The Unique ID of any group record with which the history, notes, or attachment record is associated. This field is supplied by the system.

Merge Timestamp

MTIME

Char
6

4

NHF_MergeTimestamp

Date and time the history, notes, or attachment record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Recorded Date

Char
8

200

NHVF_RecordedDate

The date portion of the User Time field. The format is YYYYMMDD. This field is retrieved from the User Time field and is read-only.

Recorded Time

Char
4

201

NHVF_RecordedTime

The time portion of the User Time field. The format is HHMM. This field is retrieved from the User Time field and is read-only.

Regarding

REGARDING

Char
6

26

NHF_Text

Description of the history event or the attachment, or the text of the note. This 6-byte field is supplied by the system and contains a reference to a field in the Binary Large Object (BLOB) Database file that contains a maximum of 30,000 characters. The next table shows descriptions of the regarding text by type number.

Type

TYPE

Num
3

25

NHF_Type

History event, note, or attachment type number. The next table shows values for the type numbers.

Unique Id

UNIQUE_ID

Char
12

1

NHF_UniqueID

Unique notes, history, or attachment record identification number. This field is supplied by the system.

Record Manager

USER

Char
12

6

NHF_UserId

The Unique ID of the database user permitted to access and change the status of private activities. This field is supplied by the system.

User Time
(Date and Time display)

USER_TIME

Char
12

27

NHF_UserTime

Date and time the notes, history, or attachment record was created. The format is YYYYMMDDHHMM. A different date and time can be specified when an activity is cleared to history.

The following table shows type values and regarding text for the Regarding and Type fields in the Notes/History table.

Type

Regarding text

 

Type

Regarding text

0

Call Attempted

 

15

Delete Activity

1

Call Completed

 

16

E-mail Sent

2

Call Received

 

17

Call Left Message

3

Field Changed

 

50

Fax Sent

4

Access

 

51

Sent Sync

5

Letter Sent

 

52

Received Sync

6

Meeting Held

 

53

Replace Fields Log

7

Meeting Not Held

 

54

To-do Erased

8

To-do Done

 

55

Meeting Erased

9

To-do Not Done

 

56

Error

10

Timer

 

57

Closed/Won Sale (for ACT! 2000 or later)

11

Call Erased

 

58

Lost Sale (for ACT! 2000 or later)

12

Contact Deleted

 

100

Note

13

Update Contact

 

101

Attachment

14

Update Activity

 

102

E-mail (for ACT! 4.0 or later)


Relational table (.REL) fields

The following table shows database schema for each field in an ACT! database Relational table. All fields in this table are supplied by the system.

Field name

Database
schema name

Format/
Length

Description

Create Time Stamp

CTIME

Char
6

Date and time the relational table database record was created. This field is currently blank and reserved for future use.

Edit Time Stamp

ETIME

Char
6

Date and time the relational table database record was last modified. This field is currently blank and reserved for future use.

Field1(ID)

FIELD1

Char
12

For type 0 and 1 records, contains the Unique ID of the record in the contact or group database associated or linked with the group or activity record Unique ID in Field2(ID).

For type 3 records, contains the Unique ID of the database user associated with the activity record Unique ID in Field2(ID) of the activity, which has an alarm for the user for whom the activity is scheduled.

Field2(ID)

FIELD2

Char
12

Unique ID of the record in the group or activity database that is associated with the contact or group record Unique ID in Field1(ID).

Field3(Time)

TIME

Char
12

The activity alarm time. The format is YYYYMMDDHHMM.

Field4(Time)

TIME2

Char
12

The activity scheduled date. The format is YYYYMMDDHHMM. This field is blank if an alarm is not set for the activity.

Type

TYPE

Char
1

Database relationship type number.
Values are:
0  Links contact and group database records
1  Links contact and activity database records
3  Links contact database records with alarms

Understanding the Relational table

The following table shows relationship type values and descriptions in the Relational table.

Type

Field1(ID)

Field2(ID)

Description

0

Contact Unique ID

Group Unique ID

Links contact and group database records

1

Contact Unique ID

Activity Unique ID

Links contact and activity database records

3

Contact Unique ID of the database user for whom the activity is scheduled

Activity Unique ID

Links contact database records with alarms

 

The following diagram shows how the Field1(ID) and Field2(ID) fields in the Relational table file are used to link records in the Contact, Group, and Activity table.


Sales table (.SDB) fields (ACT! 2000 or later)

The following table shows database schema and Sales tab information for each field in an ACT! database Sales table. The Sales table exists only in ACT! 2000 or later.

Field name

Database
schema name

Format/
Length

Field
ID

Field
constant

Description

Amount

SAMOUNT

Num
19

34

SLF_Amount

The total amount for the sale, stored with 5 digits to the right of the decimal point.

Competitors

Char
100

202

SLVF_Competitors

Name of the main competitor for the sale. This field is retrieved from the List table and is read-only.

Contact

CONTACTID

Char
12

25

SLF_ContactId

The Unique ID of the contact record with which the sales record is associated. This field is supplied by the system.

Create Timestamp

CTIME

Char
6

2

SLF_CreateTime

Date and time the record was created. This field is supplied by the system and stored in a compressed format.

Creation Date

STARTDATE

Char
8

35

SLF_SaleStartDate

Date on which the sales forecast was created. The format is YYYYMMDD.

Details

NOTES

Char
6

36

SLF_Notes

Description of the sale or sales opportunity. This 6-byte field is supplied by the system and contains a reference to a field in the Binary Large Object (BLOB) Database file that contains a maximum of 32,768 characters.

Edit Timestamp

ETIME

Char
6

3

SLF_EditTime

Date and time the record was last modified. The initial value is the date and time the record was created. This field is supplied by the system and stored in a compressed format.

Forecasted close date

SDATE

Char
8

31

SLF_SaleDate

Forecasted or actual close date for the sale. The format is YYYYMMDD.

Group

GROUPID

Char
12

26

SLF_GroupId

The Unique ID of the group record with which the sales record is associated. This field is supplied by the system.

Main Competitor

COMPETID

Char
12

37

SLF_CompetitorsId

The Unique ID of the main competitor for the sale. This field is supplied by the system and references a competitor stored in the List table.

Merge Timestamp

MTIME

Char
6

4

SLF_MergeTime

Date and time the record was imported into ACT! or synchronized with another ACT! database. This field is supplied by the system and stored in a compressed format.

Price

SPRICE

Num
19

33

SLF_UnitPrice

The price per unit, stored with 5 digits to the right of the decimal point.

Probability

PROBABIL

Num
4

30

SLF_Probability

Probability of making the sale as a percentage from 0 to 100.

Product Id

PRODID

Char
12

28

SLF_ProductId

The Unique ID for the name of the product. This field is supplied by the system.

ProductName

Char
100

200

SLVF_ProductName

Name of the product for the sale. This field is retrieved from the List table and is read-only.

Reason

REASON

Char
65

38

SLF_Reason

Reason that the sale was closed/won or lost.

Record Manager

USER

Char
12

6

SLF_UserId

The Unique ID of the Record Manager for the sale. This field is supplied by the system.

Sales Stage

SALESSTAGE

Char
40

39

SLF_SalesStage

Stage of the sale in the sales process (New Opportunity, Pre-Approach, and so on).

Status

SLSTATUS

Num
1

27

SLF_Status

Status of the sale.
Values are:
0  Sales opportunity
1  Closed/Won Sale
2  Lost Sale

Type

SLTYPE

Char
12

29

SLF_TypeId

The Unique ID of the type for the sale. This field is supplied by the system and references a type stored in the List table.

TypeName

Char
100

201

SLVF_TypeName

Name of the product type for the sale. This field is retrieved from the List table and is read-only.

Unique Id

UNIQUE_ID

Char
12

1

SLF_UniqueID

Unique sales record identification number. This field is supplied by the system.

Units

SUNITS

Num
14

32

SLF_Units

Number of units expected to sell or sold.

 


BI


ACT! Software Development Kit (SDK)
Technical Reference Guide

ACT! Command ID Reference appendix

The software described in this book is furnished under a license agreement and may be used only in accordance with the terms of the agreement.

Copyright Notice

Portions of this publication copyright 2000 Interact Commerce Corporation. Portions of this publication copyright  1993 ‑ 2000 Symantec Corporation under exclusive license to Interact Commerce Corporation.

All Rights Reserved.

Released: 6/2000 for ACT! 2000

This document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine-readable form without prior consent in writing from Interact Commerce Corporation, 8800 N. Gainey Center Dr. #200, Scottsdale, AZ 85258.

ALL EXAMPLES WITH NAMES, COMPANY NAMES, OR COMPANIES THAT APPEAR IN THIS MANUAL ARE IMAGINARY AND DO NOT REFER TO, OR PORTRAY, IN NAME OR SUBSTANCE, ANY ACTUAL NAMES, COMPANIES, ENTITIES, OR INSTITUTIONS. ANY RESEMBLANCE TO ANY REAL PERSON, COMPANY, ENTITY, OR INSTITUTION IS PURELY COINCIDENTAL.

Every effort has been made to ensure the accuracy of this manual. However, Interact Commerce makes no warranties with respect to this documentation and disclaims any implied warranties of merchantability and fitness for a particular purpose. Interact Commerce shall not be liable for any errors or for incidental or consequential damages in connection with the furnishing, performance, or use of this manual or the examples herein. The information in this document is subject to change without notice.

Trademarks

ACT! is a registered trademark and SideACT! is a trademark under exclusive license to Interact Commerce Corporation by their owner, Symantec Corporation, in the United States and other countries. Interact Commerce Corporation and not Symantec Corporation has produced this publication and is responsible for the contents hereof. Symantec and WinFax are U.S. registered trademarks of Symantec Corporation. WinFax PRO is a trademark of Symantec Corporation. Microsoft, MS, Windows, Windows CE, Windows NT, Word, Schedule+, ActiveX, FoxPro, Visual Basic, and Visual C++ are either registered trademarks or trademarks of Microsoft Corporation in the U.S. and/or other countries. Dale Carnegie Training is a registered trademark of Dale Carnegie and Associates, Inc. ECCO is a trademark of NetManage Inc. ExpensAble is a registered trademark of Managemark, Inc. Palm is a trademark of Palm, Inc. GoldMine is a trademark of Goldmine Software Corp. Janna Contact is the exclusive property of Janna Systems Inc. Maximizer is a registered trademark of Modatech Systems Inc. Lotus Organizer is a trademark of Lotus Development Corporation. Quicken is a registered trademark of Intuit, Inc. Sidekick is a trademark of Starfish Software. Sharkware is a trademark of CogniTech Corporation. Tracker is a trademark of Softcode Pty Ltd. Yahoo! is a registered trademark of Yahoo! Inc. WordPerfect is a registered trademark of Novell, Inc. CompuServe is a registered trademark of CompuServe, Inc., and its affiliates. cc:Mail and cc:Mail Mobile are trademarks of cc:Mail, Inc., a wholly owned subsidiary of Lotus Development Corporation. Day Runner is a registered trademark of Day Runner, Inc. Day-Timer is a registered trademark of Day-Timers, Inc. Netscape is a trademark of Netscape Communications Corporation. Portions of ACT! are Copyright 1995 by Streetwise Software. All rights reserved.

Other product names mentioned in this manual may be trademarks or registered trademarks of their respective companies and are the sole property of their respective manufacturers.

Printed in the United States of America.

10  9  8  7  6  5   4  3  2  1


B

 
APPENDIX

ACT! Command IDs

This appendix provides a list of ACT! command IDs that are referenced in the ACT! OLE Application Object and the Adding Custom Commands to ACT! sections of the ACT! SDK.

The following values represent Command IDs used in ACT!.

Command ID

Command

101

File > New

102

File > Open

103

File > Close

104

File > Save

105

File > Save Copy As

150

File > Exit

302

Edit > Cut

303

Edit > Copy

304

Edit > Paste

320

Tools > Record Macro

321

Tools > Run Macro

322

Tools > Delete Macro

344

Tools > Spelling

347

Tools > SideACT!

500

Move To First Contact Record (Contacts view)

501

Move To Previous Contact Record (Contacts view)

502

Move To Next Contact Record (Contacts view)

503

Move To Last Contact Record (Contacts view)

510

Contact > New Contact (Contacts view)

511

Contact > Duplicate Contact (Contacts view)

514

Contact > Delete Contact (Contacts view)

520

Contact > Group Membership (Contacts view)

540

Contact > Phone Contact (Contacts view)

541

Contact > Insert Note (Contacts view)
Group > Insert Group Note (Groups view)

542

Contact > Record History (Contacts view)

543

Contact > Attach File (Contacts view)
Group > Attach File (Groups view)

544

Lookup Selected (Contact List view)

545

Omit Selected (Contact List view)

551

Contact > E-mail Addresses (Contacts view)

700

Lookup > My Record (Contacts view)

701

Lookup > All Contacts (Contacts view)

702

Lookup > Company (Contacts view)

703

Lookup > First Name (Contacts view)

704

Lookup > Last Name (Contacts view)

705

Lookup > Phone (Contacts view)

706

Lookup > City (Contacts view)

707

Lookup > State (Contacts view)

708

Lookup > Zip Code (Contacts view)

709

Lookup > ID/Status (Contacts view)

710

Lookup > Other Fields (Contacts view)

720

Lookup > All Groups (Groups view)

721

Lookup > Other Fields (Groups view)

730

Lookup > Previous (Contacts view)

731

Lookup > Keyword Search (Contacts view)

732

Lookup > By Example (Contacts view)

733

Lookup > Internet Directory (Contacts view)

911

E-Mail > Send Mail Now (E-Mail view)

912

E-Mail > Send Mail Later (E-Mail view)

916

E-Mail > Reply To Message (E-Mail view)

917

E-Mail > Forward Message (E-Mail view)

918

E-Mail > Delete Message (E-Mail view)

919

E-Mail > Previous Message (E-Mail view)

920

E-Mail > Next Message (E-Mail view)

923

E-Mail > Read Message (E-Mail view)

1301

View > Daily Calendar (Calendar view)

1302

View > Weekly Calendar (Calendar view)

1303

View > Monthly Calendar (Calendar view)

1320

Contact > Schedule Call (Contacts view and Groups view in ACT! 2000 or later)

1321

Contact > Schedule Meeting (Contacts view)

1322

Contact > Schedule To-do Call (Contacts view and Groups view in ACT! 2000 or later)

1323

Contact > Clear Activity Call (Contacts view and Groups view in ACT! 2000 or later)

1324

Contact > Clear Multiple Activities Call (Contacts view and Groups view in ACT! 2000 or later)

1334

View > Filter Activities (Contacts view)

1337

Contact > Reschedule Activity (Contacts view and Groups view in ACT! 2000 or later)

1343

Contact > Send Activity (Contacts view and Groups view in ACT! 2000 or later)

1900

Group > New Group (Groups view)

1901

Group > Duplicate Group (Groups view)

1903

Group > Delete Group (Groups view)

1904

Group > Group Membership (Groups view)

1908

Move To First Group Record (Groups view) (ACT! 4.0 or earlier only)

1909

Move To Previous Group Record (Groups view) (ACT! 4.0 or earlier only)

1910

Move To Next Group Record (Groups view) (ACT! 4.0 or earlier only)

1911

Move To Last Group Record (Groups view) (ACT! 4.0 or earlier only)

1914

Group > Group Membership > Run Rules (Groups view) (requires ACT! 2000 or later)

1915

Group > New Subgroup (Groups view) (requires ACT! 2000 or later)

1916

Group > Move Group (Groups view) (requires ACT! 2000 or later)

1917

Group > Group Membership > Define Rules (Groups view) (requires ACT! 2000 or later)

1918

Group > Group Membership > View Rules (Groups view) (requires ACT! 2000 or later)

20000

Window > Cascade

20001

Window > Tile Horizontal

20002

Window > Tile Vertical

2300

Write > Letter

2301

Write > Memorandum

2302

Write > Fax Cover Page

2303

Write > Mail Merge

2304

Write > Other Document

2305

Write > Edit Document Template

2306

Write > E-mail Message

2500

View > Contacts

2501

View > Calendar

2503

View > E-mail

2504

View > Groups

2505

View > Mini-Calendar

2506

View > Contact List

2507

View > Task List

2509

View > Activities Tab

2510

View > Notes/History Tab

2513

Edit Mode (Contact List view)

2514

Tag Mode (Contact List view)

2517

View > Groups Tab (Contacts view)

2518

View > Contacts Tab (Groups view)

2519

View > Sales/Opportunities Tab (requires ACT! 2000 or later)

2702

View > Filter Notes/History

2800

Reports > Contact Report

2801

Reports > Contact Directory

2802

Reports > Phone List

2803

Reports > Task List

2804

Reports > Notes/History

2805

Reports > History Summary

2806

Reports > Activities/Time Spent

2807

Reports > Contact Status

2808

Reports > Source of Referrals

2809

Reports > Group Membership (ACT! 4.0 or earlier only)
Reports > Group Reports > Group Membership (requires ACT! 2000 or later)

2813

Reports > Sales Reports > Sales List (requires ACT! 2000 or later)

2814

Sales > Sales Graph (requires ACT! 2000 or later)
Reports > Sales Reports > Sales Graph (requires ACT! 2000 or later)

2815

Sales > Sales Funnel (requires ACT! 2000 or later)
Reports > Sales Reports > Sales Funnel (requires ACT! 2000 or later)

2816

Reports > Sales Reports > Sales Funnel Report (requires ACT! 2000 or later)

2817

Reports > Group Reports > Group Summary (requires ACT! 2000 or later)

2818

Reports > Group Reports > Group Comprehensive (requires ACT! 2000 or later)

2825

Reports > Sales Reports > Sales Totals By Status (requires ACT! 2000 or later)

2826

Reports > Sales Reports > Sales Adjusted For Probability (requires ACT! 2000 or later)

2827

Reports > Sales Reports > Sales By Record Manager (requires ACT! 2000 or later)

2828

Reports > Sales Reports > Sales By Contact (requires ACT! 2000 or later)

3300

Sales > New Sales Opportunity (requires ACT! 2000 or later)

3301

Sales > View/Edit Sale (requires ACT! 2000 or later)

3302

Sales > Complete Sale (requires ACT! 2000 or later)

3303

Sales > Delete Sale (requires ACT! 2000 or later)

3305

Sales > Dale Carnegie Training > Relationship Process (requires ACT! 2000 or later)

3306

Sales > Dale Carnegie Training > Web Site (requires ACT! 2000 or later)

3307

Sales > Modify Sales Stages (requires ACT! 2000 or later)

20251

Contact > View/Edit Activity Details (requires ACT! 2000 or later)