Title: WinCOM Post by: . on April 10, 2008, 01:30:33 pm where can I find any documentation about methods and properties for excel and outlook
thanks a lot Ralph Title: Re: WinCOM Post by: Lionel F. on April 10, 2008, 06:20:25 pm Hello Ralph,
Concerning Excel, you can find an example in the Genero Desktop Client documentation : https://4js.com/online_documentation/fjs-gdc-2.10.01-manual-html/User/WinCOM.html (https://4js.com/online_documentation/fjs-gdc-2.10.01-manual-html/User/WinCOM.html) As you probably know, The Wincom API is based on VBA, therefore our syntax is really close to this language. My method (at least with Excel and Word) : recording a macro of what I'm expecting to achieve, and adapting the VBA code to the WinCom functions (mainly with CallMethod and SetProperty). Now, how does it work with Outlook : 1) Create the Microsoft Outlook object How to create the Outlook object in VBA : Code
How to create the Outlook object in BDL : Code
2) Create object of Outlook (contact, appointment and so on...). Find below the URL which shows the various Microsoft Outlook's objects: http://msdn2.microsoft.com/en-us/library/aa271596(office.11).aspx (http://msdn2.microsoft.com/en-us/library/aa271596(office.11).aspx) Example with a ContactItem object. That would allow you, for example, to automatically add a new contact from a BDL program to Microsoft Outlook : In VBA : Code
In BDL: Code
3) Display the contact form of Outlook : In VBA : Code
In BDL : Code
4) Now, you're probably expecting to file some fields of the contact form (First Name, Name, Address and so on...). In order to achieve this, you have to know the various properties of the object (i.e. : in this case, the ContactItem object). This is also available from the MSDN website from Microsoft : msdn2.microsoft.com/en-us/library/aa210907(office.11).aspx (http://msdn2.microsoft.com/en-us/library/aa210907(office.11).aspx) (see the bottom of the page) Now, you just have to set those properties with the function "SetProperty" of the WinCom API, e.g. : Code
5) Save your contact form with the "Save" method of the ContactObject (find the methods available at the same URL than the properties): Code
Of course, this method can be applied to the other objects of the Outlook models (appointment, journal ....). You just have to follow the corresponding MSDN properties and methods. I hope it helps. Let me know if you need further information. Best regards, Lionel Title: Re: WinCOM Post by: . on April 16, 2008, 12:58:46 pm excel works fine
next I'll give a try to outlook... thanks a lot Ralph Title: Re: WinCOM Post by: . on July 30, 2008, 04:24:14 pm hello again,
now everything works fine with outlook, too. But there is some problem using property attachments We use CALL ui.Interface.frontCall("WinCOM", "SetProperty", [xlwb, "Attachments.add",p_str], [result]) to add the attachment. we tried with LET p_str = "C:\\documents\\test.doc" or LET p_str = "C:/documents/test.doc" we only get the information "Fehler beim Ausführen der Operation." Title: Re: WinCOM Post by: Lionel F. on August 01, 2008, 02:22:33 pm Hello Ralph,
With the version I tested (Outlook 2003-SP2) , you have to proceed like this : Code
and then : Code
I hope it helps. Let me know if you need further information. Regards, Lionel Title: Re: WinCOM Post by: . on August 01, 2008, 03:02:48 pm great
now it works thanks a lot Ralph |