Closed AronGahagan closed 11 months ago
If ActiveProject.Name returns a url, the path builder fails.
ActiveProject.Name
strFile = oShell.SpecialFolders("Desktop") & "\" strFile = strFile & Replace(Replace(ActiveProject.Name, ".mpp", ""), " ", "_") strFile = strFile & "_ResourceDemand" & Format(Now(), "yyyy-mm-dd-hh-nn-ss") & ".csv"
Use Regex:
strFile = cptRegEx(ActiveProject.Name, "[^\\/]{1,}$") 'works with local, server, and sharepoint strFile = Replace(strFile, ".mpp", "") 'remove .mpp if local strFile = Replace(strFile, " ", "_") 'replace spaces with strFile = oShell.SpecialFolders("Desktop") & "\" & strFile strFile = strFile & "_ResourceDemand" & Format(Now(), "yyyy-mm-dd-hh-nn-ss") & ".csv"
The above should work for local files, projects on server, as well as files on a URL.
topic
Issue #XXX -
waiting on feedback from L
Problem:
If
ActiveProject.Name
returns a url, the path builder fails.Solution:
Use Regex:
The above should work for local files, projects on server, as well as files on a URL.
Todo:
topic
branchIssue #XXX -
topic
into appropriate branch(es) and push