2012-03-28 2 views
1

나는 "닫기"라는 새로운 버튼을 구현하고 "코드 숨김"는 다음과 같습니다Visio를 ActiveDocument.Close() 오류 사용하여 C#을

public static void ForceCloseAll(Visio.Documents docs) 
    { 
     while (docs.Count > 0) 
     { 
      docs.Application.ActiveDocument.Close(); 
     } 
    } 

하지만이 오류 받고 있어요 :

"The operation cannot be performed while doing in-place editing". 

누구나 아는 이유는 무엇입니까?

+0

을 저장하지 마십시오. –

답변

0

당신은 당신의 문서 같은 붙어

public static void ForceCloseAll(Visio.Documents docs) 
{ 
    while (docs.Count > 0) 
    { 
     docs.Application.ActiveDocument.Saved = true; 
     docs.Application.ActiveDocument.Close(); 
    } 
} 
+0

@RodrigoCampos 당신은 "저장된"파일이 필요합니다. – Jones

관련 문제