View Single Post
 
Old 12-13-2016, 03:17 PM
dwirony dwirony is offline Windows 7 64bit Office 2003
Advanced Beginner
 
Join Date: Oct 2016
Posts: 49
dwirony will become famous soon enough
Default

Quote:
Originally Posted by Guessed View Post
That requires a bit more effort. This takes the current filename before the first period (assuming the first period is at the file extension), and appends the new file extension
Sub Savetolocation()
Dim sLocation As String, sFile as String
sFile = Split(ActiveDocument.Name,".")(0) & ".docx"
sLocation = "C:\Users\dwirony\My Documents\Overflow Folder\" & sFile
ActiveDocument.SaveAs2 FileName:=sLocation, FileFormat:=wdFormatXMLDocument, CompatibilityMode:=14
End Sub
Luckily for me the first period is at the file extension. Genius solution, thanks for the help Andrew.
Reply With Quote