>>>The solution is addapted from information found on the Microsoft Knowledge Base. The program runs great on my machine that has the full 5.0a Version installed but fails on a machine with only the 5.0 Drivers installed.
>>>
>>>The Error I recieve is ole error code 0x80040112. Appropriate License for this class not found.
>>>
>>>I have created a prg and turned it into an exe which is run from the start|run window.
>>>The code is as follows as suggested by MS.:
>>> loForm = CREATEOBJECT("form")
>>> loForm.addobject("Session1", "olecontrol", "MSMAPI.mapiSession")
>>> loForm.addobject("Message1", "olecontrol", "MSMAPI.mapiMessages")
>>>
>>>Line two fails on the machine with only the drivers installed.
>>>I have installed and registered the MSMapi controls.
>>>
>>>The documentation does not list any classes to include with the prg.
>>>
>>>
>>>I was able to make this work by building a form and adding the two controls to the form. When I turned the form into an exe, it runs great on the machine with drivers only. The reason I don't want to run it this way was the prg was easier to manipulate and the form flashes on the screen for a second before the invisible command is executed.
>>>
>>>
>>>Does anyone have any suggestions on how I can get the exe with the addobject(msmapi) code to work on a machine that contains the VFP5 drivers only?
>>>
>>>Thanks,
>>>
>>>Michael
>>
>>Hi Michael
>>
>>I used the same logic and it works great.
>>Add msmapi32.ocx to the user machine or the network machine.
>>If you are using setup add msmapi32 as active X.
>>
>>Mo
>
>Thanks Mo,
>
>I already have the ocx installed and registered on the machine.
>I can see it in the NT directory.
>
>Why does the control work on a form but not on a created form in a prg??
>
>Michael
Michael, sometimes an entry in the registry is removed by another program. There's a program in the Files section here which will re-install the registry entry: FOXREG.ZIP in the Files section. It gives you the necessary registry information which can be imported through RegEdit.
HTH
Barbara