0
현재 Publisher (2003, 2007 및 2010)에 저장된 많은 양의 문서를 열어 Word 문서로 변환해야합니다. 이것들은 간단한 한 페이지짜리 텍스트 문서이지만 약 1,000 개가 변환되어 있습니다.폴더에서 Publisher 파일을 열고 Word 문서로 저장
Public Sub Pub_To_Word()
Dim FS As New FileSystemObject
Dim pubApp As Publisher.Application
' Reference Library pointing to:
' Microsoft Scripting Runtime
' Microsoft Word 14.0 Object Library
Dim FSfolder As Folder
Dim MyFile As File
Dim mydoc As Document
Dim sFolderPath As String
Dim Table As Table
sFolderPath = "I:\My Documents\Publisher Test"
Set FSfolder = FS.GetFolder(sFolderPath)
For Each MyFile In FSfolder.Files
Set mydoc = pubApp.Open(MyFile)
Application.DisplayAlerts = False
mydoc.SaveAs Filename:MyFile & ".docx", FileFormat:=wdFormatXMLDocument
mydoc.Close savechanges:=True
pubApp.DisplayAlerts = True
End If
Next
End
End Sub
코드는 디버깅
FileFormat:=wdFormatXMLDocument
에서 나는이 시점 과거를 얻을 수없는 것 : 여기 내가 가지고있는 코드입니다.