View Single Post
 
Old 12-13-2016, 03:03 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
ActiveDocument.FullName includes the entire path so you are simply saving the file over itself. Try
Code:
Sub Savetolocation()
  Dim sLocation As String
  sLocation = "C:\Users\dwirony\My Documents\Overflow Folder\" & ActiveDocument.Name
  ActiveDocument.SaveAs2 FileName:=sLocation, FileFormat:=wdFormatXMLDocument, CompatibilityMode:=14
End Sub
Ahh, that makes sense. Your solution is getting it to save to the right file location, although now it's no longer changing the document to a .docx. I tried adding "& ".docx"" to the end of sLocation but the file name is retaining ".rtf" in the name now. How could I get it to change from rtf to docx?

Thank you for your assistance!
Reply With Quote