F
Fred
How do I update the macro from MVP site to include 2007 .dotx extension or
allow it to select the default .doc or .dotx extension. OR can the extension
be dropped and default to 97-2003 or 2007 depending on which program is
open - many thanks.
Sub SaveIncrementedFilename()
Dim PathAndFileName As String, n As Long
PathAndFileName = "c:\test\test"
If Dir(PathAndFileName & ".doc") = "" Then
ActiveDocument.SaveAs (PathAndFileName & ".doc")
Else
n = 1
Do While Dir(PathAndFileName & n & ".doc") <> ""
n = n + 1
Loop
ActiveDocument.SaveAs PathAndFileName & n & ".doc"
End If
End Sub
allow it to select the default .doc or .dotx extension. OR can the extension
be dropped and default to 97-2003 or 2007 depending on which program is
open - many thanks.
Sub SaveIncrementedFilename()
Dim PathAndFileName As String, n As Long
PathAndFileName = "c:\test\test"
If Dir(PathAndFileName & ".doc") = "" Then
ActiveDocument.SaveAs (PathAndFileName & ".doc")
Else
n = 1
Do While Dir(PathAndFileName & n & ".doc") <> ""
n = n + 1
Loop
ActiveDocument.SaveAs PathAndFileName & n & ".doc"
End If
End Sub