A
Amir
I'm trying to check the Created Document's template in a .NET Add-in using
the code bellow:
Private Function IsManagedTemplate( _
ByVal currentDocument As Document) As Boolean
If CBool(currentDocument.DocumentSheet.SectionExists( _
CShort(VisSectionIndices.visSectionUser), 0)) Then
If CBool(currentDocument.DocumentSheet.CellExistsU( _
TEMPLATE_USER_CELL, 0)) Then
Return True
End If
End If
Return False
End Function
that call the function in DocumentCreated's event handler:
IsManagedTemplate(visioApp.ActiveDocument)
visioApp is an object of "Application" Interface in visio PIA and
TEMPLATE_USER_CELL is a constant string with the value of "User.MyT"
also, I made a template that has User-defined part in PageSheet and has one
row in that part named "MyT"
but the function return False.
Any Idea...
Thanks in advance
the code bellow:
Private Function IsManagedTemplate( _
ByVal currentDocument As Document) As Boolean
If CBool(currentDocument.DocumentSheet.SectionExists( _
CShort(VisSectionIndices.visSectionUser), 0)) Then
If CBool(currentDocument.DocumentSheet.CellExistsU( _
TEMPLATE_USER_CELL, 0)) Then
Return True
End If
End If
Return False
End Function
that call the function in DocumentCreated's event handler:
IsManagedTemplate(visioApp.ActiveDocument)
visioApp is an object of "Application" Interface in visio PIA and
TEMPLATE_USER_CELL is a constant string with the value of "User.MyT"
also, I made a template that has User-defined part in PageSheet and has one
row in that part named "MyT"
but the function return False.
Any Idea...
Thanks in advance