>Dear All
>
>After reinstalling VFP on a new machine with Office 2013, I got into very strange situation where OLE automation will no longer
>accept relative paths. The same code was working ok past 10 years.
>
>It is happening only in development mode (inside VFP ide) when compiled into EXE everything works ok.
>
>
>
>cFile='\templates\some.xls'
>if file(cFile)
> oXl.workbooks.open(cFile)
> .
> ****BUT
> .
> cFile='c:\templates\some.xls'
> oXl.workbooks.open(cFile)
>
> .
>
>
>
>The same goes for outlook object attaching file with relative path. As if it applies for all office (or OLE automation with office) .
>Did not try word or anything else.
>
>What am I missing here ?
>Anybody have any idea why is this happening ?
>
>
>TIA
>Sergio
I learned to never trust relattive paths when it comes to automation.
The application have one MS Office has others :-)
That is why i always use FULLPATH() :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.