getVisible" attribure not firing for second time in word VSTO.
Can anyone know the answer?
Below is my code
public bool IsCheckARIDInitializedFlag(Office.IRibbonControl control)
{
bool IscheckMetadata = false;
Microsoft.Office.Interop.Word.Application app = Globals.ThisAddIn.Application;
if (app.Documents.Count > 0)
{
DocumentProperties oCustProps;
DocumentProperty oProp;
oCustProps = app.ActiveDocument.CustomDocumentProperties;
if (oCustProps.Count > 0)
{
foreach (DocumentProperty oProp_loopVariable in oCustProps)
{
oProp = oProp_loopVariable;
if (oProp.Name == "ARIDInitialized")
{
//IscheckMetadata = true;
string ARIDInitializedValue = oProp.Value;
if (ARIDInitializedValue.ToLower() == "true")
{
IscheckMetadata = true;
}
else if (ARIDInitializedValue.ToLower() == "false")
{
IscheckMetadata = false;
}
break;
}
}
if (IscheckMetadata == false)
{
return IscheckMetadata;
}
}
else
{
return IscheckMetadata;
}
}
else
{
return IscheckMetadata;
}
return IscheckMetadata;
}
Replies
Know the answer? Post it — somebody with the same question will find it here.