Sub crfolder()
usrdt = Format(Date, "DD-MMMM-YYYY") & "-" & Format(Now(), "hh.mm AMPM") & "/"
MkDir "//mysite.sharepoint.com/teams/test1/test2/" & usrdt
End Sub
MkDir
using a web URL. Sync the SharePoint directory to your computer. You'll then end up with a path something like C:\Users\%UserName%\SharePointCompanyName\SharePoint\Folder\Path\
that is local to your computer that you can use with MkDir
. As an example,Sub CreateSharePointDirectory()
Dim folderPath As String
Dim ans As String
Dim userName As String
userName = Replace(Application.userName, " ", ".")
folderPath = "C:\Users\" & userName & "\SharePointCompanyName\SharePoint\Folder\Path\"
If Dir(folderPath, vbDirectory) = vbNullString Then
ans = MsgBox("Folder does not exist. Create?", vbYesNo)
If ans = vbYes Then
MkDir folderPath
Else
Exit Sub
End If
End If
End Sub
I don't know if any of these will work as I have never tried them (as everything I need to work on is already synced), but a quick google search yields some possible directions to take.but is there any way of creating folder on sharepoint, without syncing sharepoint to my computer