Has anyone done this ?

Has anyone done this ?

Postby TimStone » Wed Mar 27, 2019 9:11 pm

My application maintains a client list with names, phone numbers, emails, etc. Of course it is stand alone.

While talking to a customer today, I wondered about sharing that client info into a contacts list ( iPhone ). Since we can do email through Outlook, I began thinking maybe we could share our Clients to Outlook also, and in doing that, it could share those contacts with our phones ( or any device running Outlook ).

Has anyone played with this ? Any thoughts ? I'd be happy to work on incorporating this ( and sharing the code ), but thought maybe someone has info that would help.

Loving the possibility.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Has anyone done this ?

Postby Silvio.Falconi » Wed Mar 27, 2019 9:44 pm

Code: Select all  Expand view
#include "fivewin.ch"
#define olFolderContacts 10

ANNOUNCE RDDSYS

FUNCTION MAIN( cNomeFile )

LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" )
LOCAL oNameSpace := oOutlook:GetNameSpace("MAPI")
LOCAL oContacts := oNameSpace:GetDefaultFolder( olFolderContacts )

LOCAL i
LOCAL aStruct := {}
AADD( aStruct , { "NOME" , "C" , 50 , 0 } )
AADD( aStruct , { "INDI" , "C" , 50 , 0 } )
AADD( aStruct , { "CAP" , "C" , 5 , 0 } )
AADD( aStruct , { "CITTA" , "C" , 50 , 0 } )
AADD( aStruct , { "STATO" , "C" , 50 , 0 } )
AADD( aStruct , { "STATO2" , "C" , 50 , 0 } )
AADD( aStruct , { "TELEFONO" , "C" , 50 , 0 } )
AADD( aStruct , { "EMAIL" , "C" , 50 , 0 } )
AADD( aStruct , { "NOTE" , "M" , 10 , 0 } )

DbCreate( cNomeFile , aStruct, "DBFCDX" )


SET DATE BRITISH
USE &cNomeFIle

FOR i = 1 TO oContacts:Items:Count
APPEND BLANK
REPLACE field->nome WITH oContacts:Items[ i ]:FullName
REPLACE field->indi WITH oContacts:Items[ i ]:BusinessAddressStreet
REPLACE field->cap WITH oContacts:Items[ i ]:BusinessAddressPostalCode
REPLACE field->citta WITH oContacts:Items[ i ]:BusinessAddressCity
REPLACE field->stato WITH oContacts:Items[ i ]:BusinessAddressState
REPLACE field->stato2 WITH oContacts:Items[ i ]:BusinessAddressCountry
REPLACE field->telefono WITH oContacts:Items[ i ]:BusinessTelephoneNumber
REPLACE field->email WITH oContacts:Items[ i ]:Email1Address
REPLACE field->note WITH oContacts:Items[ i ]:Body

NEXT

oOutlook:Quit()

RETURN NIL


INIT PROCEDURE RddInit
REQUEST DBFFPT
REQUEST DBFCDX


but I not try it ...it's a Marco Boschi source code
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 7054
Joined: Thu Oct 18, 2012 7:17 pm

Re: Has anyone done this ?

Postby TimStone » Wed Mar 27, 2019 10:57 pm

Thanks ... that imports contacts into a database. I actually want to go the other way and feed customers in my system to contacts ... but that gives me a start.

Does anyone have a link to explanations on using MAPI with Outlook ( fields, etc ).
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Has anyone done this ?

Postby James Bott » Fri Apr 05, 2019 3:45 pm

Tim,

Try a Google search for "mapi outlook"
FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Marc Venken, Silvio.Falconi and 100 guests