Help with saving

  • Thread starter Thread starter caj
  • Start date Start date
C

caj

I have a template that is saved on a sharepoint site and used by many
different people. Problem is when people open the template and add text, then
go to save, they inadvertently save the file as a .dot file.

I have a AutoNew macro that would force the file to be saved as a .doc. This
works if the file is opened directly from a directory, but it does not work
when opened from where it is a link on the sharepoint internet site.

Is there another way to force the file to save as a .doc? Or is there a
better way to do this? Below is the code for the AutoNew macro:

Sub AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory sPath
On Error GoTo Cancelled
ActiveDocument.Save
Application.DefaultSaveFormat = ""
Exit Sub
Cancelled:
If Err.Number = 4198 Then
MsgBox "User Cancelled"
End If
End Sub
 
You had better ask in a programming newsgroup such as
microsoft.public.word.vba.general for assistance with this.
 
Back
Top