Forum Discussion
Khibby
Dec 06, 2023Copper Contributor
What is the filename referenced in this script?
The guy that wrote this script is no longer with the company. When I run it I get a message from Project, "The map with the specified name does not exist. Verify the name is correct, and try again....
- Dec 07, 2023
This isn't a PowerShell issue but rather an issue using the msproject.application class.
My best guess - given the lack of specificity in the error - is that the error is coming from the
$Project.FileSaveAs() call on line 40, and specifically relates to the map parameter value of "BI Export".Here's some references:- Application.FileSaveAs method (Project) | Microsoft Learn
- ms office - Microsoft Project Export Map, copying the map itself - Stack Overflow
Cheers,
Lain
LainRobertson
Dec 07, 2023Silver Contributor
This isn't a PowerShell issue but rather an issue using the msproject.application class.
My best guess - given the lack of specificity in the error - is that the error is coming from the
$Project.FileSaveAs() call on line 40, and specifically relates to the map parameter value of "BI Export".
Here's some references:
- Application.FileSaveAs method (Project) | Microsoft Learn
- ms office - Microsoft Project Export Map, copying the map itself - Stack Overflow
Cheers,
Lain