![]() |
#4
|
||||
|
||||
![]()
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
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
staicumihai | Word VBA | 2 | 10-28-2016 03:01 AM |
![]() |
klpw | Excel Programming | 2 | 12-24-2015 12:31 AM |
![]() |
bigbird69 | Word VBA | 13 | 11-18-2012 10:06 PM |
outlook 2003 always not remove temp copy of opened attachments in temporary folder | c.itech | Outlook | 0 | 06-20-2011 10:34 PM |
Error 451 - Couldīt Open Temp file | greenberet | Outlook | 1 | 09-06-2010 05:35 AM |