Hi -
I'm writing some vba code in Visio that 1. opens a selected Project file, 2. creates a Map, and 3. exports that map data to Excel. I've got the rest of the code working, but I get an error 1101 / argument value is not valid with this statement.
The MS Project code that works when run in Project is this:
Application.MapEdit name:="visio_HLS_export", Create:=True, OverwriteExisting:=True, _DataCategory:=pjMapTasks, CategoryEnabled:=True, TableName:="tasks", _
FieldName:="Unique ID", ExternalFieldName:="TaskUID", ExportFilter:="IsMilestoneFlag"
The code in Visio is the same, except the "Application" object is replaced with my MSProject object (mspApp). I've got a similar routine set up to create the "IsMilestoneFlag" filter, and that is working fine. The filter is created in the local organizer, then copied to Global.mpt, so it should be able to find it. Not sure what else could be causing the failure.
Set mspApp = CreateObject("MSProject.Application")
mspApp.MapEdit Name:="visio_HLS_export", Create:=True, OverwriteExisting:=True, _DataCategory:=pjMapTasks, CategoryEnabled:=True, TableName:="tasks", _
FieldName:="Unique ID", ExternalFieldName:="TaskUID", ExportFilter:="IsMilestoneFlag"
Any ideas?