II
TC I II III IV V

 ACT! OLE Application Object

with and

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

*VB

* Execute the Write Other Documents... menu command

objDatabase.Command(2304)

 

*VFox

* Execute the Write Other Documents... menu command

objDatabase.Command(2304)

 

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 UID of record created.

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

Example:         objActivity.goto(ACTACTIV.Unique_Id)
if objActivity.data(1) =ACTACTIV.Unique_Id
   * found
endif

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.

* VB

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

* VFox

 

 

 

'Initialize the Application object.

'This starts ACT! if it is not already running.

objApp = CreateObject("ACTOLE.APPOBJECT")

 

'Open the database.

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

 

'Set the Preferences object.

objPreferences = objApp.Preferences

 

'Checks the Notes/History checkbox in the Data to be Synchronized.

objPreferences.SetDataToSynch(2)

 

'Close the application.

objPreferences = Null

objApp = Null

 

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

* VB
'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

* VFox
'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"

 

objPref = Null

 

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

*VB

object.CloseAll

*VFox

objDatabase.CloseAll

 

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.

 

 


Trademark Notice