Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
prints different after saving document | New Users | |||
word closed without saving document | Microsoft Word Help | |||
Saving final document to multiple files when merge document has multiple section | Mailmerge | |||
saving a password protected document as a new document without ca. | Microsoft Word Help | |||
Keep cursor at end of word document upon saving. | Microsoft Word Help |