Try oleExcel.Application.DefaultFilePath property - Returns or sets the default path that Microsoft Excel uses when it opens files.
>Hi all,
>
>Again with questions. :)
>
>From inside VFP I run this code to start Excel:
>
>1. oleExcel = CREATEOBJECT("Excel.application")
>2. oleExcel.application.workbooks.open("C:\mypath\mybook.xls")
>3. oleExcel.visible = .T.
>
>I need between steps 1 and 2, to set the Excel active path (via a swicth is: /p "C:\mypath"
>
>How can I do this with OLE?
>
>Thanks.