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

Re: Help with autoexec by Graham

Graham
Tue Jul 15 22:29:38 PDT 2008

Why are they 'opening' the template at all? They should be creating new
documents from the template, then the issue shouldn't arise.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


caj wrote:
> 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



Re: Help with autoexec by caj

caj
Wed Jul 16 13:17:00 PDT 2008

The file .dot opens as a read_only .dot file when opened from the site . They
are creating new documents but when they go to save the file it ends up being
saved as a .dot and not doc.

"Graham Mayor" wrote:

> Why are they 'opening' the template at all? They should be creating new
> documents from the template, then the issue shouldn't arise.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> caj wrote:
> > 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
>
>
>

Re: Help with autoexec by caj

caj
Wed Jul 16 13:20:12 PDT 2008

I created this but it causes Word to crash when run. Can you help with this:

Public Sub FileSave()
Dim sFolder As String
Dim oDialog As Dialog

sFolder = Options.DefaultFilePath(wdCurrentFolderPath)
'Change the next line to your requirements
ChangeFileOpenDirectory "C:\"

Set oDialog = Dialogs(wdDialogFileSaveAs)
With oDialog
.Format = wdFormatDocument
.Show
End With

ChangeFileOpenDirectory sFolder
ActiveWindow.Caption = ActiveDocument.FullName

End Sub


"caj" wrote:

> The file .dot opens as a read_only .dot file when opened from the site . They
> are creating new documents but when they go to save the file it ends up being
> saved as a .dot and not doc.
>
> "Graham Mayor" wrote:
>
> > Why are they 'opening' the template at all? They should be creating new
> > documents from the template, then the issue shouldn't arise.
> >
> > --
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > Graham Mayor - Word MVP
> >
> > My web site www.gmayor.com
> > Word MVP web site http://word.mvps.org
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >
> >
> > caj wrote:
> > > 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
> >
> >
> >