Mark and Daniel have given you excellent code for getting started with OLE Automation. One more thing: The easiest way to see what commands to give Excel is to record an Excel macro that does the work for you. Then open the macro with the editor and you will see the commands needed. The biggest problem will be that Excel uses pre-set constants in its commands. You'll need to get a list of the VFP equivalents. Coincidentally, Mike Stewart from MS gave a link for this just yesterday:
MSDN Link John Harvey's Page also has a list of constants you can use.
HTH
Barbara
>you wrote...
>
>> I use OLE Automation - open the template, save it to a new name and then walk > through the cursor putting the data into the template.
>
>I think I can open the template using OLE Automation, but what are the commands
>I have to use to '...walk through the cursor putting the data into the template' / if I do not use a macro in Excel, I mean all the code in VFP side ?