If all you want, is to save in another format, you can use the saveas function.
ox=Createobject('excel.application')
owb=ox.Workbooks.Open(lcFile)
lcFile='yourfile.xls'
ox.DisplayAlerts= .F.
owb.SaveAs(lcFile,39)
owb.close()
owb=.null.
ox=.null.
Release owb
Release ox
39 will save in the old Excel7 format, which most applications will handle fine. For other options you can check
http://msdn.microsoft.com/en-us/library/bb241279.aspx>Dear Experts,
>
>My current Appliaciotn is developed under Vfp8 with Sql Sever,
>and also enhanced with email facility to send the mails and reports in Excel
>format, Till now is working fine.
>
>But, Recently we have updated our server with Ms Office 2007,
>after this i m try open any XL attachments in the MS outlook i m getting error like
>
>" The file is trying to open is in differnet format than specified by the file extensison, Varify that file the file is not corrupted and is from trusted source. do you want to open this file now ? ". How to avoid this message ?.
>
>I noticed that in Ms office2007 the Default XL file extension is .XLSX instead of Normal XLS file format.
>
>Im using ObjExcel= CREATEOBJECT("Excel.Application") to create xlobject.
>
>But it always generate file with .XLS Extension format.
>
>Pls help me over come this probem.
>
>Thanks in advance.
>
>Regards
>Abdulla