Re: Saving a document as and automatically deleting the original by weetabx
weetabx
Thu Jun 24 19:30:52 CDT 2004
Thanks Helmut,
It sure is better than the one I came up with (I am posting it for you
to have a laugh!)
Sub Rename()
ActiveDocument.Save
Dim OldName, NewName
OldName = ActiveDocument.Name: NewName = InputBox("Supply file name",
"Rename", OldName) ' Define file name.
If NewName = "" Then
End
End If
ActiveDocument.Close
Name OldName As NewName
Documents.Open NewName
End Sub
Thanks,
Wtbx
Helmut Weber <elmkqznfwvccbf@mailinator.com> wrote in message news:<lg3md01vmcagcnf1893ngal6lsfck5bhr0@4ax.com>...
> Hi,
> not at the same time, but afterwards.
> Remember old name
> Oldname = activedocument.fullname
> Dialogs(wdDialogFileSaveAs).Show
> Kill oldname
> You'll get an error if you cancel the dialog.
> Greetings from Bavaria, Germany
> Helmut Weber, MVP
> "red.sys" & chr(64) & "t-online.de"
> Word XP, Win 98