Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
Hi All,
I am having trouble with making code for creating a folder in the current user's My Documents folder. Recommendations? Dim objFSO As Object Set objFSO = CreateObject("scripting.FileSystemObject") objFSO.CreateFolder (("C:\Documents & Settings\" & Environ("UserName") _ & "\My Documents\myNewFolder")) Set objFSO = Nothing tia ![]() Gil |
#2
![]() |
|||
|
|||
![]()
It is called Documents *and* Settings (not Documents & Settings)
... and My Documents only has a single space Other than that your code should work -- Enjoy, Tony "gils usenet acct" wrote in message ... Hi All, I am having trouble with making code for creating a folder in the current user's My Documents folder. Recommendations? Dim objFSO As Object Set objFSO = CreateObject("scripting.FileSystemObject") objFSO.CreateFolder (("C:\Documents & Settings\" & Environ("UserName") _ & "\My Documents\myNewFolder")) Set objFSO = Nothing tia ![]() Gil |
#3
![]() |
|||
|
|||
![]()
Thanks Tony, ...
Your points worked like a charm. ![]() gil "Tony Jollans" Nomail wrote in message ... It is called Documents *and* Settings (not Documents & Settings) ... and My Documents only has a single space Other than that your code should work -- Enjoy, Tony "gils usenet acct" wrote in message ... Hi All, I am having trouble with making code for creating a folder in the current user's My Documents folder. Recommendations? Dim objFSO As Object Set objFSO = CreateObject("scripting.FileSystemObject") objFSO.CreateFolder (("C:\Documents & Settings\" & Environ("UserName") _ & "\My Documents\myNewFolder")) Set objFSO = Nothing tia ![]() Gil |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Printing a current page in MS Word | Microsoft Word Help | |||
code to place shortcut on user's desktop or Start menu? | Microsoft Word Help | |||
Word 2003 forgets folder | Microsoft Word Help | |||
How do I use the PRINT field code to ... | Microsoft Word Help |