Political espionage Homepage
Forum Home Forum Home > Computers > Computer Discussion
  New Posts New Posts RSS Feed - Convert .doc to .docx
  FAQ FAQ  Forum Search   Events   Register Register  Login Login


Convert .doc to .docx

 Post Reply Post Reply
Author
Message
admin View Drop Down
Admin Group
Admin Group


Joined: 31 Oct 2018
Status: Offline
Points: 34
Post Options Post Options   Thanks (0) Thanks(0)   Quote admin Quote  Post ReplyReply Direct Link To This Post Topic: Convert .doc to .docx
    Posted: 29 Jul 2020 at 1:06pm
Sub TranslateDocIntoDocx()
Dim objWordApplication As New Word.Application
Dim objWordDocument As Word.Document
Dim strFile As String
Dim strFolder As String
strFolder = "E:\Temp\"
strFile = Dir(strFolder & "*.doc", vbNormal)
While strFile <> ""
With objWordApplication
Set objWordDocument = .Documents.Open(FileName:=strFolder &strFile, AddToRecentFiles:=False, ReadOnly:=True, Visible:=False)
With objWordDocument
.SaveAs FileName:=strFolder & Replace(strFile, "doc", "docx"), FileFormat:=16
.Close
End With
End With
strFile = Dir()
Wend
Set objWordDocument = Nothing
Set objWordApplication = Nothing
End Sub
Back to Top
Sponsored Links


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.

This page was generated in 0.094 seconds.