2009-10-13 4 views
0

클라이언트 환경이 최근 Word 2000에서 2003으로 마이그레이션되면서 템플릿의 아래 코드를 사용하여 단어의 기본 삽입 파일 대화 상자를 표시합니다. Word는 다른 타사 응용 프로그램 Hummingbird docspen과 통합됩니다. 이전 환경에서VBA Word 2003 대화 상자

With Dialogs(wdDialogInsertFile) 
     .Name = "q:\*.*" 

     .Show 

    End With 

는 워드 2003, 그것은 대화 상자 insertfile Docsopen을 열어 내 문서 폴더를 가리키는 대화 상자 insertfile 기본 열립니다.

단어 2000과 2003의 설정을 비교 한 결과 동일하다고 생각됩니다.

이 문제에 대한 제안 사항.

답변

0

죄송합니다. Word 2003/Win XP에서 재현 할 수 없습니다. 복사/붙여 넣기 코드 및 "파일 삽입"대화 상자가 있습니다. 작동하지 않는 유일한 방법은 디렉토리 Q를 가리하는 것입니다 : 당신이 좋아, 첫째 Options.DefaultFilePath (wdDocumentsPath)을 설정해야이 들어

Private Sub CommandButton1_Click() 

' save current doc path and set to insert path 
MyPath = Options.DefaultFilePath(wdDocumentsPath) 
Options.DefaultFilePath(wdDocumentsPath) = "C:\" 

' display insert file dialog 
With Dialogs(wdDialogInsertFile) ' this works in debug mode as well as on clicking Command Button from Doc 
    .Name = "*.txt" 
    .Show 
End With 

' restore original doc path 
Options.DefaultFilePath(wdDocumentsPath) = MyPath 

End Sub 

행운의

관련 문제