I am almost certain that I have answered this question for you already elsewhere.
The biggest challenge in what you want to do is caused by Outlook, not VFP.
Outlook can only use the PST file(s) that it is configured to use. That configuration establishes a path and filename for the PST file.
And once Outlook is open, it 'captivates' that PST file so that it will not allow the file itself to change.
VFP can easily use the COPY FILE command to Move/Copy a file from one location to another and change its filename along the way. But if the file is 'captivated' by an Outlook session then a Sharing Violation will occur and the change in file will not occur.
One way to do this will work, but it is somewhat 'messy'.
VFP can close Outlook.
Then once Outlook is closed it can change the previously defined PST file itself from its original file to another file with something like this...
Code:
[B]cSource[/B] = C:\Documents and Settings\MySelf\Local Settings\Application Data\Microsoft\Outlook\File2.PST
[B]cDestination[/B] = C:\Documents and Settings\MySelf\Local Settings\Application Data\Microsoft\Outlook\Outlook.PST
[B]COPY FILE (cSource) TO (cDestination)[/B]
Now when Outlook is opened again (either by VFP or manually) the PST file will have the contents you desire.
There
may be a way to change Outlook's pre-configured PST file path and filename within the Windows Registry, but I haven't tried that. HOWEVER, even if it could be done this way, Outlook would still need to be closed to make the change so that upon opening again it would use the new PST path/filename.
Good Luck,
JRB-Bldr