|
* 楼主,请将 2 或 3 个文件放到一个新建文件夹中,点击文件夹,确定即可(先做实验)。
* 另存为缩略图,到底有何意义?我怎么看不到缩略图在哪里?请试用下面的代码。
- Sub Dir_FileSaveAs_SLT()
- Dim Path$, FileName$
- With Application.FileDialog(msoFileDialogFolderPicker)
- If .Show Then Path = .SelectedItems(1) & "" Else End
- End With
- If MsgBox("Are you sure to select the folder """ & Path & """ ?", 4 + 16) = vbNo Then End
- FileName = Dir(Path & "*.doc*")
- Do While FileName <> ""
- Documents.Open FileName:=Path & FileName
- With ActiveDocument
- If FileName Like "*.doc" Then
- .SaveAs FileName:=Path & "SLT " & FileName, FileFormat:=wdFormatDocument
- ElseIf FileName Like "*.docx" Then
- .SaveAs FileName:=Path & "SLT " & FileName, FileFormat:=wdFormatXMLDocument
- End If
- .Close
- End With
- FileName = Dir
- Loop
- MsgBox "Complete!", 0 + 48, "FileSaveAs"
- End Sub
复制代码 |
|