Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
AMG
 
Posts: n/a
Default Saving document in the appropriate place

I have a macro that redefines the "SaveAs" command so that the document is
saved as the contents of a formfield in the document plus the date of the
document. I also have a command to save the document in a particular place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does NOT save to
that folder and instead saves to the folder listed under Tools, Options, File
Locations. I find I have to change the file under Tools, Options, File
Locations in order to get the document to save in the right place. How can I
save the document in the place I specifiy?

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Saving document in the appropriate place

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the document is
saved as the contents of a formfield in the document plus the date of the
document. I also have a command to save the document in a particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does NOT save
to
that folder and instead saves to the folder listed under Tools, Options,
File
Locations. I find I have to change the file under Tools, Options, File
Locations in order to get the document to save in the right place. How
can I
save the document in the place I specifiy?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
AMG
 
Posts: n/a
Default Saving document in the appropriate place

The third line gives me an error saying that this is not a valid file name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the document is
saved as the contents of a formfield in the document plus the date of the
document. I also have a command to save the document in a particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does NOT save
to
that folder and instead saves to the folder listed under Tools, Options,
File
Locations. I find I have to change the file under Tools, Options, File
Locations in order to get the document to save in the right place. How
can I
save the document in the place I specifiy?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Saving document in the appropriate place

Of course it does. You have to set the value of pFileName before you use it.





"AMG" wrote in message
...
The third line gives me an error saying that this is not a valid file name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the document
is
saved as the contents of a formfield in the document plus the date of
the
document. I also have a command to save the document in a particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does NOT
save
to
that folder and instead saves to the folder listed under Tools,
Options,
File
Locations. I find I have to change the file under Tools, Options, File
Locations in order to get the document to save in the right place. How
can I
save the document in the place I specifiy?






  #5   Report Post  
Posted to microsoft.public.word.docmanagement
AMG
 
Posts: n/a
Default Saving document in the appropriate place

Sorry, but I don't know how to write in Visual Basic very well.

I want to save the document in the folder C:\Documents and
Settings\Gwinnett Clinic\My Documents\Bay Area Mobile

How would I write that?

"Jezebel" wrote:

Of course it does. You have to set the value of pFileName before you use it.





"AMG" wrote in message
...
The third line gives me an error saying that this is not a valid file name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the document
is
saved as the contents of a formfield in the document plus the date of
the
document. I also have a command to save the document in a particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does NOT
save
to
that folder and instead saves to the folder listed under Tools,
Options,
File
Locations. I find I have to change the file under Tools, Options, File
Locations in order to get the document to save in the right place. How
can I
save the document in the place I specifiy?









  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Saving document in the appropriate place

Follow the instructions I gave you.



"AMG" wrote in message
news
Sorry, but I don't know how to write in Visual Basic very well.

I want to save the document in the folder C:\Documents and
Settings\Gwinnett Clinic\My Documents\Bay Area Mobile

How would I write that?

"Jezebel" wrote:

Of course it does. You have to set the value of pFileName before you use
it.





"AMG" wrote in message
...
The third line gives me an error saying that this is not a valid file
name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the
document
is
saved as the contents of a formfield in the document plus the date
of
the
document. I also have a command to save the document in a
particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does
NOT
save
to
that folder and instead saves to the folder listed under Tools,
Options,
File
Locations. I find I have to change the file under Tools, Options,
File
Locations in order to get the document to save in the right place.
How
can I
save the document in the place I specifiy?









  #7   Report Post  
Posted to microsoft.public.word.docmanagement
AMG
 
Posts: n/a
Default Saving document in the appropriate place

This is my macro and I continue to get an error message since it doesn't want
to recognize my form field:

Sub FileSaveAsAgave()
'
' FileSaveAs Macro
'
Dim pFileName As String
myPath = "C:\"
pFileName = myPath & Format$(Now, "yyyymmdd") & [Text1] & [Text2] & [Text7]
ActiveDocument.SaveAs FileName:=pFileName
Dialogs(wdDialogFileSaveAs).Show
End Sub

I simply used text1, text2, text3, etc to label the form fields.

"Jezebel" wrote:

Follow the instructions I gave you.



"AMG" wrote in message
news
Sorry, but I don't know how to write in Visual Basic very well.

I want to save the document in the folder C:\Documents and
Settings\Gwinnett Clinic\My Documents\Bay Area Mobile

How would I write that?

"Jezebel" wrote:

Of course it does. You have to set the value of pFileName before you use
it.





"AMG" wrote in message
...
The third line gives me an error saying that this is not a valid file
name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the
document
is
saved as the contents of a formfield in the document plus the date
of
the
document. I also have a command to save the document in a
particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does
NOT
save
to
that folder and instead saves to the folder listed under Tools,
Options,
File
Locations. I find I have to change the file under Tools, Options,
File
Locations in order to get the document to save in the right place.
How
can I
save the document in the place I specifiy?










  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Jezebel
 
Posts: n/a
Default Saving document in the appropriate place

You need to *retrieve* the contents of your formfields. Have you ever looked
at Help?

ActiveDocument.FormFields("Text1").Result, etc

You might want to use more meaningful names, too.




"AMG" wrote in message
...
This is my macro and I continue to get an error message since it doesn't
want
to recognize my form field:

Sub FileSaveAsAgave()
'
' FileSaveAs Macro
'
Dim pFileName As String
myPath = "C:\"
pFileName = myPath & Format$(Now, "yyyymmdd") & [Text1] & [Text2] &
[Text7]
ActiveDocument.SaveAs FileName:=pFileName
Dialogs(wdDialogFileSaveAs).Show
End Sub

I simply used text1, text2, text3, etc to label the form fields.

"Jezebel" wrote:

Follow the instructions I gave you.



"AMG" wrote in message
news
Sorry, but I don't know how to write in Visual Basic very well.

I want to save the document in the folder C:\Documents and
Settings\Gwinnett Clinic\My Documents\Bay Area Mobile

How would I write that?

"Jezebel" wrote:

Of course it does. You have to set the value of pFileName before you
use
it.





"AMG" wrote in message
...
The third line gives me an error saying that this is not a valid
file
name

Dim pFileName As String

myPath = "C:\"

ActiveDocument.SaveAs FileName:=pFileName

"Jezebel" wrote:

Dim pFileName as string

pFileName = myPath & [formfield] & format$(Now, "yyyymmdd")
ActiveDocument.SaveAs FileName:=pFileName




"AMG" wrote in message
...
I have a macro that redefines the "SaveAs" command so that the
document
is
saved as the contents of a formfield in the document plus the
date
of
the
document. I also have a command to save the document in a
particular
place,
i. e., myPath = "C:\Bay Area Mobile\". However the document does
NOT
save
to
that folder and instead saves to the folder listed under Tools,
Options,
File
Locations. I find I have to change the file under Tools,
Options,
File
Locations in order to get the document to save in the right
place.
How
can I
save the document in the place I specifiy?












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
prints different after saving document Wayne Mery New Users 2 November 18th 05 04:40 PM
word closed without saving document rodylynn45 Microsoft Word Help 1 November 8th 05 12:44 PM
Saving final document to multiple files when merge document has multiple section Shannon W via OfficeKB.com Mailmerge 1 September 19th 05 05:31 AM
saving a password protected document as a new document without ca. mailgirl Microsoft Word Help 2 April 15th 05 03:04 PM
Keep cursor at end of word document upon saving. garycom Microsoft Word Help 2 April 12th 05 05:13 AM


All times are GMT +1. The time now is 10:25 AM.

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"