Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Shell Folder Object
Message
From
22/07/2003 09:29:04
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00812320
Message ID:
00812334
Views:
12
This message has been marked as the solution to the initial question of the thread.
Then, the only thing I see is that cParentFolder ("c:\Archive") does not exist, Can you check that ?

>Sorry it didn't work! I'm still having the same error msg.
>
>
>>Enmanuel,
>>
>>Think you have to add a line (see below)
>>
>>>I have translated the following code
>>>
>>>
>>>Const FOF_CREATEPROGRESSDLG = &H0&
>>>ParentFolder = "D:\Archive"
>>>Set objShell = CreateObject("Shell.Application")
>>>Set objFolder = objShell.NameSpace(ParentFolder)
>>>objFolder.CopyHere "C:\Scripts", FOF_CREATEPROGRESSDLG
>>>
>>>
>>>
>>>To VFP like this:
>>>
>>>
>>>#DEFINE FOF_CREATEPROGRESSDLG = &H0&
>>>
>>>cParentFolder = "c:\Archive"
>>>objShell = CreateObject("Shell.Application")
>>>LOCAL objFolder  as objShell.NameSpace(cParentFolder)
>>
>>&& add this line, the above line only declares objFolder
>>objFolder = objShell.NameSpace(cParentFolder)
>>&&
>>
>>>objFolder.CopyHere("C:\Folder")
>>>
>>>
>>>However, after I run the code the line
>>>
>>>objFolder.CopyHere("C:\Folder")
>>>
>>>
>>>says objfolder is not an object. What am I doing wrong? Any help will be appreciated!
>>>
>>>TIA,
>>>
>>>Enmanuel
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform