Hi Neil,
Unless u insist on using macro invoking VFP etc, you could also finish whole thing from within VFP.
Have look at rep2excel toll here in downloads, it is set of class objects having methods for most of common automation tasks.
It can write whole tables,arrays,delimited strings etc into any given position of any given template using 3d positioning (nSheet,nRow,nCol) . (Freeware/SourceIncl.)
What is also helpfull are excel macros, which you can copy into VFP code,
modify little bit and produce exactly action that macro does but
via OLE automation. You can also find plenty of good automation examples in various threads here on UT.
Rgds++
Sergio
>We have a standard excel template which needs to be populated with data. The data is held in a number of foxpro tables. Therefore what I would like is for the user to click a macro within the excel document which will invoke my foxpro application. From this it will prompt the user for a particular record when they click ok the data will be imported onto a new sheet in the original excel document. From here I then use this data on my excel sheet.
>
>Does anybody know how best to do this. The foxpro side is pretty easy its the invoking the excel exectuable and importing the data within a new sheet that I am unfamliar with. Any help would be really appreciated
>
>Many Thanks