.Address Control Ex


Address Control Ex can work with any Windows application using ShellExecute/CreateProcess called with different command lines. The capabilities of this program is very similar to Address Ex. You can try this by simply installing the shareware version of Address Ex and running it with a special command line.
- Click Start button,
- Select Run and type in
"C:\Program Files\Address Ex\aex.exe" /s /only=29 icFLC icEMA1
Once the user can selects a contact (or contacts) and clicks the okay button, the program will write the contact information (in plain text format) to a file and it will exit.

In the parent application, you can use ShellExecute or CreateProcess to run the program. Using different command lines you can tell the program which address book field you want and what should be returned and where you want it stored.

Below is a simple c++ example for running Address Control Ex from any win32 application.

Sample code:

char path[256];
//The parent application needs to know where the program is installed
sprintf(path,
"c:\\installation folder\\aex.exe");

//Make sure Address Ex is there
if(access(path,
00)!=0)
{
__MessageBox("Address book control not found!");
__return;
}

PROCESS_INFORMATION pi;
STARTUPINFO si;
ZeroMemory(&si,sizeof(STARTUPINFO));
ZeroMemory(&pi,sizeof(PROCESS_INFORMATION));
si.cb=sizeof(si);


//Contact must have an email address (only=29 is for email)
//We want contact's First Last Company and E-mail address
char c[256];
sprintf(c,
"\"%s\" /s /only=29 icFLC icEMA1",path);
if(!CreateProcess(path,c,
__NULL,NULL,FALSE,NORMAL_PRIORITY_CLASS,NULL,NULL,&si,&pi))
{
__MessageBox("Error, could not launch address book! (aex.exe)");
__return;
}
ULONG exitcode;
GetExitCodeProcess(pi.hProcess,&exitcode);
CloseHandle(pi.hProcess);

//if user click Cancel, or there is no email address
//was selected, do nothing

if(exitcose!=0) return;

//else, there should be some names and email
//addresses in "Address.txt" in text format
//(look in aex.exe module directory)


Address Ex in selector mode:


Choose one or more contacts and click OK. AEX will get the contact information, store it text format, and it will simply exit. It doesn't matter if you selected contacts from a local AEX address book file, or a shared AEX address book file on a network, or an extern or local LDAP server server, Windows Address Book, or another WAB file.
The data will be stored in "c:\program files\address ex\Address.txt" (you can also change this path)

Many other customization are available, from changing the Window Text to changing the hint text for the OK button and running the program to look like a modal or modeless dialog. End users can still manage their contacts in the default explorer interface.


Other examples:
aex.exe /only=29 icEMA1
 icEMA1 means: output Email Address to 'address.txt'
 /only=29 means: output only if item has field 29. Field 29 is is the integer number for icEMA1, email address (see table)

aex.exe /only=28 icFAX_B
 icFAX_B means: output Business Fax to 'address.txt'
 /only=28 means: output only if item has field 28. Field 28 is is the integer number for icFAX_B, business fax (see table)

aex.exe /only=29 /filter=29 icFLC icEMA1
 output FirstName_LastName_Company\TAB Email Address\TAB
 /filter=29 means: the combo box at the bottom starts with this filter (business fax)

aex.exe icALL
 output all fields
 output all selected items

Program returns:
0 on OK
1 on Cancel

To run the editor, use /edit
aex.exe /edit

Notes:
- Command line must contain atleast one icXXX field
- if command line is blank, it defaults to aex.exe /only=28 icFAX_B
- Arguments that start with "/" must be put first
- icFLC, icFIR,  icEMA1, etc are put last.
- Window text and okay button hint text can't have blanks. "+" sign in tile is converted to blanks
- The first line in 'Address.txt' is the field headings
- icALL puts all the feilds in address.txt
- Every item should have one of First, Last, or Company (icFLC) so you can't use icFLC with /only or /filter


Description of icXXX fields:

icXXX    number "Long Name"
icNIC  0//
icTIT  1
icFIR   2
icMID   3//
icLAS  4
icSUF  5//
icJOB  6
icDEP  7
icCOM  8
icADR1_H  9
icADR2_H  10
icCIT_H 11
icSTA_H 12
icZIP_H 13
icCON_H 14
icADR1_B  15
icADR2_B  16
icCIT_B 17
icSTA_B 18
icZIP_B 19
icCON_B 20
icTEL1_H  21
icTEL2_H  22
icTEL1_B  23
icTEL2_B  24
icMOB   25
icPAG   26
icFAX_H   27
icFAX_B   28
icEMA1    29
icEMA2    30
icWEB1    31
icWEB2    32
icKEY    33
icFTP   34
icNEWS    35
icICQ  36
icDES   37
icBIR  38
icANI  39
icDATEADD 40
icDATEMOD 41
icUSER1 42
icUSER2 43
icUSER3 44
icUSER4 45
icUSER5   46
icUSER6 47
icUSER7 48
icUSER8   49
icOTH   50
"NickName",        //0
"Title",
"First Name",
"Middle Name",
"Last Name",
"Suffix",
"Job Title",
"Department",
"Company",
"Home Street",
"Home Street 2",           //10
"Home City",
"Home State",
"Home Postal Code",
"Home Country",
"Business Street",
"Business Street 2",
"Business City",
"Business State",
"Business Postal Code",
"Business Country",        //20
"Home Phone",
"Home Phone 2",
"Business Phone",
"Business Phone 2",
"Mobile Phone",
"Pager",
"Home Fax",
"Business Fax",
"E-mail Address",
"E-mail Address 2",        //30
"Web Page",
"Web Page 2",
"Keywords",
"FTP",
"News Group",      //the fields below may change in future
"ICQ",
"Description",
"Birthday",
"Anniversary",
"Date Created",           //40
"Date Modified",
"User 1",
"User 2",
"User 3",
"User 4",
"User 5",
"User 6",
"User 7",
"User 8",
"Other Information"       //50

Address Ex in Edit Mode:


For more information please contact info@nsnsoftware.com. For capabilties and limitations please see documentation on our latest shareware release version.