My mxd has a dataframe which contains a MS Word-Object ("Insert" - "Object").
I want to access the mxd dataframe in PyScripter using
arcpy.mapping.ListDataFrames(mxd)[0]
However, i get the following error:
AttributeError: 'NoneType' object has no attribute 'dataFrames'
Also, importing the mxd to ArcGIS Pro does not work either.
When i delete the Word-Object these errors does not occur.
(Note: When i use the build in python window in ArcMap, the AttributeError does not occur. However, i would like to make it work in PyScripter)
I thought about deleting the Word-Object with Arcpy, is that possible? I have hundreds of mxds with this Word-Object, so i need to automate this.
I already tried using ListLayoutElements but nothing is returned because the object was added in data view.
My problem was solved in my question on GIS StackExchange .
It's not possible with arcpy, i will try it using ArcObjects / VBA