Select to view content in your preferred language

Get MXD file name and location

2354
1
07-28-2010 08:40 AM
JudsonOldford
Deactivated User
Hi,

I was wondering how to get the location and name of a MXD that is currently open.  I want to be able to get it into the FileInfo assembly.

Thanks

Will
0 Kudos
1 Reply
AndrewMay
Emerging Contributor
Hi

If you're using VBA then use:

Dim pProject As VBProject
Set pProject = ThisDocument.VBProject

Otherwise something like the following should work:

Application.Templates.Item(Application.Templates.Count - 1)

I've not tested this so might not be 100% accurate but should set you on your way.
0 Kudos