Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
caj caj is offline
external usenet poster
 
Posts: 16
Default I need a Save (or SaveAs) macro

Can anyone help (ASAP)!! I created a Word template that is going to be used
by many different people (some of which are not very familiar with Word). The
template will be stored on the internet and when downloaded and saved does
not save the file as a doc. What i need is a macro that on the first time the
document is saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
caj caj is offline
external usenet poster
 
Posts: 16
Default I need a Save (or SaveAs) macro

The macro would be inserted into the template (.dot) as the template may or
may not be saved to the person's individual template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I save the
file to intrenal sharepoint server. It tries to save the file back to the
server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is going to be used
by many different people (some of which are not very familiar with Word). The
template will be stored on the internet and when downloaded and saved does
not save the file as a doc. What i need is a macro that on the first time the
document is saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of the
template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default I need a Save (or SaveAs) macro

The following macro saved in the document template will change the file save
path to the user's documents path and prompt to save the document whenever a
new document is created from that template:

Sun AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory "sPath"
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



caj wrote:
The macro would be inserted into the template (.dot) as the template
may or may not be saved to the person's individual template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I
save the file to intrenal sharepoint server. It tries to save the
file back to the server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is going
to be used by many different people (some of which are not very
familiar with Word). The template will be stored on the internet
and when downloaded and saved does not save the file as a doc.
What i need is a macro that on the first time the document is
saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of the
template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
caj caj is offline
external usenet poster
 
Posts: 16
Default I need a Save (or SaveAs) macro

Graham ...... I entered the code and I keep getting a Runtime 4127 Error.

"Graham Mayor" wrote:

The following macro saved in the document template will change the file save
path to the user's documents path and prompt to save the document whenever a
new document is created from that template:

Sun AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory "sPath"
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



caj wrote:
The macro would be inserted into the template (.dot) as the template
may or may not be saved to the person's individual template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I
save the file to intrenal sharepoint server. It tries to save the
file back to the server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is going
to be used by many different people (some of which are not very
familiar with Word). The template will be stored on the internet
and when downloaded and saved does not save the file as a doc.
What i need is a macro that on the first time the document is
saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of the
template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default I need a Save (or SaveAs) macro

Oops! Correcting the typo 'Sun' to 'Sub' might help? ( but the real
problem is the quotes around sPath

Change to

Sub AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory sPath
On Error GoTo Cancelled
ActiveDocument.Save
Exit Sub
Cancelled:
If Err.Number = 4198 Then
MsgBox "User Cancelled"
End If
End Sub

Apologies
--

Graham Mayor - Word MVP

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



caj wrote:
Graham ...... I entered the code and I keep getting a Runtime 4127
Error.

"Graham Mayor" wrote:

The following macro saved in the document template will change the
file save path to the user's documents path and prompt to save the
document whenever a new document is created from that template:

Sun AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory "sPath"
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



caj wrote:
The macro would be inserted into the template (.dot) as the template
may or may not be saved to the person's individual template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I
save the file to intrenal sharepoint server. It tries to save the
file back to the server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is going
to be used by many different people (some of which are not very
familiar with Word). The template will be stored on the internet
and when downloaded and saved does not save the file as a doc.
What i need is a macro that on the first time the document is
saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of
the template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
caj caj is offline
external usenet poster
 
Posts: 16
Default I need a Save (or SaveAs) macro

Thank you! Thank you. This works GREAT!! You are a gem.

"Graham Mayor" wrote:

Oops! Correcting the typo 'Sun' to 'Sub' might help? ( but the real
problem is the quotes around sPath

Change to

Sub AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory sPath
On Error GoTo Cancelled
ActiveDocument.Save
Exit Sub
Cancelled:
If Err.Number = 4198 Then
MsgBox "User Cancelled"
End If
End Sub

Apologies
--

Graham Mayor - Word MVP

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



caj wrote:
Graham ...... I entered the code and I keep getting a Runtime 4127
Error.

"Graham Mayor" wrote:

The following macro saved in the document template will change the
file save path to the user's documents path and prompt to save the
document whenever a new document is created from that template:

Sun AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory "sPath"
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



caj wrote:
The macro would be inserted into the template (.dot) as the template
may or may not be saved to the person's individual template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I
save the file to intrenal sharepoint server. It tries to save the
file back to the server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is going
to be used by many different people (some of which are not very
familiar with Word). The template will be stored on the internet
and when downloaded and saved does not save the file as a doc.
What i need is a macro that on the first time the document is
saved, it saves the file to that person's MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of
the template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com




  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default I need a Save (or SaveAs) macro

You are welcome

--

Graham Mayor - Word MVP

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



caj wrote:
Thank you! Thank you. This works GREAT!! You are a gem.

"Graham Mayor" wrote:

Oops! Correcting the typo 'Sun' to 'Sub' might help? ( but the real
problem is the quotes around sPath

Change to

Sub AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory sPath
On Error GoTo Cancelled
ActiveDocument.Save
Exit Sub
Cancelled:
If Err.Number = 4198 Then
MsgBox "User Cancelled"
End If
End Sub

Apologies
--

Graham Mayor - Word MVP

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



caj wrote:
Graham ...... I entered the code and I keep getting a Runtime 4127
Error.

"Graham Mayor" wrote:

The following macro saved in the document template will change the
file save path to the user's documents path and prompt to save the
document whenever a new document is created from that template:

Sun AutoNew()
Dim sPath As String
sPath = Options.DefaultFilePath(Path:=wdDocumentsPath)
ChangeFileOpenDirectory "sPath"
ActiveDocument.Save
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

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



caj wrote:
The macro would be inserted into the template (.dot) as the
template may or may not be saved to the person's individual
template folder.

"caj" wrote:

That is generally correct, but it is not working that way when I
save the file to intrenal sharepoint server. It tries to save the
file back to the server.

"Peter A" wrote:

In article ,
says...
Can anyone help (ASAP)!! I created a Word template that is
going to be used by many different people (some of which are
not very familiar with Word). The template will be stored on
the internet and when downloaded and saved does not save the
file as a doc. What i need is a macro that on the first time
the document is saved, it saves the file to that person's
MyDocuments folder?

Desperate in need of help.


Documents are by default saved to My Documents. The location of
the template has nothing to do with it.

--
Peter Aitken
Author, MS Word for Medical and Technical Writers
www.tech-word.com



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SaveAs & ChangeFileOpenDirectory JustinBailey Microsoft Word Help 3 September 21st 10 03:11 PM
SAVEAS / OPEN very slow Adrian Microsoft Word Help 3 August 1st 06 10:09 PM
macro saveas jakekene Microsoft Word Help 0 August 18th 05 04:38 PM
SaveAs - Curious Behavior PT New Users 1 August 7th 05 07:39 PM
Programming Open and SaveAs AMercer Microsoft Word Help 1 March 17th 05 12:11 PM


All times are GMT +1. The time now is 01:22 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"