G
Glen Mettler
I want to capture and then change the extension of a file name. For
example, I have a project "MyProject.mpp"
I want to update the project using a CSV file and predefined map. The CSV
file is the same prefix name MyProject.CSV
In my code I have:
sub UpDateWithCSV()
MyPath = Application.ActiveProject.Path
MyFile = Application.ActiveProject.name
MyCSV = the prefix from MyFile with the suffix of ".csv"
OutlineShowAllTasks
FileOpen Name:=MyPath, ReadoOnly:=False, Merge:=1,
FormatID:="MyProject.csv", map:="MyMap"
End Sub
Note that the FormatID is hard coded with the csv file name. I want to
substitute that with MyCSV.
What I don't know how to do is to capture the prefix of MyFile and
substitute ".csv"
Anybody know how to do this?
TIA
Glen
example, I have a project "MyProject.mpp"
I want to update the project using a CSV file and predefined map. The CSV
file is the same prefix name MyProject.CSV
In my code I have:
sub UpDateWithCSV()
MyPath = Application.ActiveProject.Path
MyFile = Application.ActiveProject.name
MyCSV = the prefix from MyFile with the suffix of ".csv"
OutlineShowAllTasks
FileOpen Name:=MyPath, ReadoOnly:=False, Merge:=1,
FormatID:="MyProject.csv", map:="MyMap"
End Sub
Note that the FormatID is hard coded with the csv file name. I want to
substitute that with MyCSV.
What I don't know how to do is to capture the prefix of MyFile and
substitute ".csv"
Anybody know how to do this?
TIA
Glen