HOW TO
Instructions provide a sample code to export the current map document to a Publisher file (PMF) at a given location.
Note:
Code in the Project's ThisDocument code module will only run in the current map document. To store the code in all map documents, open the Normal.mxt > ThisDocument code module instead.
Code:
Dim testpub As String
Dim pid As New UID
Dim pIPMF As IPMF
Dim pExtManager As IExtensionManager
Dim pExt As IExtension
testpub = "c:\temp\TestPub.pmf"
'Set the publisher extension
Set pExtManager = Application
pid.Value = "{8AEE0DE1-535C-4788-95C8-1659444D4C02}"
Set pExt = pExtManager.FindExtension(pid)
Set pIPMF = pExt 'QI
'Publish map document to location specified with testpub
pIPMF.PMFPublish (testpub)
Article ID:000006329
Get help from ArcGIS experts
Download the Esri Support App