Group:  Microsoft Word ยป microsoft.public.word.vba.userforms
Thread: SaveAs Default Name

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

SaveAs Default Name
"Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> 16.08.2006 19:34:42
I'm working on a UserForm for generating a letter to the referring physician
in response to a consultation. I generally name my documents with the
patient's last name and the date of the letter (e.g. Smith 2006-08-16.doc)
The UserForm, of course, gathers this info. When I click Save or SaveAs I
would like this to be the default filename. I have tried putting this into
the Title property (BuiltInDocumentProperties("Title")), but it seems that
changing the title after the document is created from the template is too
late (the default name is the Title that was put in the template). Any
other suggestions?

Thanks,

Paul Warshawsky


Re: SaveAs Default Name
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 17.08.2006 03:29:55
Add a SaveAs command to the code that transfers the data from the userform
into the document so that the document has already been saved with the
desired name before the user starts working in the body of the document
itself. Then all that they have to do is click on Save or Yes when they
attempt to exit the document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> wrote in message
news:en9HmqWwGHA.2260[ at ]TK2MSFTNGP03.phx.gbl...
[Quoted Text]
> I'm working on a UserForm for generating a letter to the referring
> physician in response to a consultation. I generally name my documents
> with the patient's last name and the date of the letter (e.g. Smith
> 2006-08-16.doc) The UserForm, of course, gathers this info. When I click
> Save or SaveAs I would like this to be the default filename. I have tried
> putting this into the Title property (BuiltInDocumentProperties("Title")),
> but it seems that changing the title after the document is created from
> the template is too late (the default name is the Title that was put in
> the template). Any other suggestions?
>
> Thanks,
>
> Paul Warshawsky
>


Re: SaveAs Default Name
"Marc Jurriens" <helmonder[ at ]hotmail.com> 01.09.2006 10:07:26
How would such a command look in VB? I would be interested in doing
something at the end of the userform that would save the document using a
filename generated from docproperty fields, something like:

SaveAs <NAME>"-"<VERSION>.doc ..

Could this be done ?

"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:OAUFu1awGHA.3364[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> Add a SaveAs command to the code that transfers the data from the userform
> into the document so that the document has already been saved with the
> desired name before the user starts working in the body of the document
> itself. Then all that they have to do is click on Save or Yes when they
> attempt to exit the document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> wrote in message
> news:en9HmqWwGHA.2260[ at ]TK2MSFTNGP03.phx.gbl...
>> I'm working on a UserForm for generating a letter to the referring
>> physician in response to a consultation. I generally name my documents
>> with the patient's last name and the date of the letter (e.g. Smith
>> 2006-08-16.doc) The UserForm, of course, gathers this info. When I click
>> Save or SaveAs I would like this to be the default filename. I have
>> tried putting this into the Title property
>> (BuiltInDocumentProperties("Title")), but it seems that changing the
>> title after the document is created from the template is too late (the
>> default name is the Title that was put in the template). Any other
>> suggestions?
>>
>> Thanks,
>>
>> Paul Warshawsky
>>
>
>


Re: SaveAs Default Name
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 01.09.2006 16:17:31
With ActiveDocument
.SaveAs "Drive:\Path\" & A.CustomDocumentProperties("DocProp_1").Value &
" - " & .CustomDocumentProperties("DocProp_2").Value & ".doc"
End With

or

ActiveDocument.SaveAs "Drive:\Path\" & txtcontrol1.text & " - " &
txtcontrol2.text & ".doc"

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Marc Jurriens" <helmonder[ at ]hotmail.com> wrote in message
news:ezLtv5azGHA.2076[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> How would such a command look in VB? I would be interested in doing
> something at the end of the userform that would save the document using a
> filename generated from docproperty fields, something like:
>
> SaveAs <NAME>"-"<VERSION>.doc ..
>
> Could this be done ?
>
> "Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
> news:OAUFu1awGHA.3364[ at ]TK2MSFTNGP02.phx.gbl...
>> Add a SaveAs command to the code that transfers the data from the
>> userform into the document so that the document has already been saved
>> with the desired name before the user starts working in the body of the
>> document itself. Then all that they have to do is click on Save or Yes
>> when they attempt to exit the document.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> wrote in message
>> news:en9HmqWwGHA.2260[ at ]TK2MSFTNGP03.phx.gbl...
>>> I'm working on a UserForm for generating a letter to the referring
>>> physician in response to a consultation. I generally name my documents
>>> with the patient's last name and the date of the letter (e.g. Smith
>>> 2006-08-16.doc) The UserForm, of course, gathers this info. When I
>>> click Save or SaveAs I would like this to be the default filename. I
>>> have tried putting this into the Title property
>>> (BuiltInDocumentProperties("Title")), but it seems that changing the
>>> title after the document is created from the template is too late (the
>>> default name is the Title that was put in the template). Any other
>>> suggestions?
>>>
>>> Thanks,
>>>
>>> Paul Warshawsky
>>>
>>
>>
>
>


Re: SaveAs Default Name
"Marc Jurriens" <helmonder[ at ]hotmail.com> 04.09.2006 09:12:36
Thanks, where would I place this code however? In what section ? I am also
using an UpdateAll Fields sub to make sure all fields in my document are
updated when I close the form and that is not working.. Maybe there is a
relation and I am just placing the code in the wrong part ?

"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:%23k58uIezGHA.3752[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> With ActiveDocument
> .SaveAs "Drive:\Path\" & A.CustomDocumentProperties("DocProp_1").Value
> & " - " & .CustomDocumentProperties("DocProp_2").Value & ".doc"
> End With
>
> or
>
> ActiveDocument.SaveAs "Drive:\Path\" & txtcontrol1.text & " - " &
> txtcontrol2.text & ".doc"
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Marc Jurriens" <helmonder[ at ]hotmail.com> wrote in message
> news:ezLtv5azGHA.2076[ at ]TK2MSFTNGP04.phx.gbl...
>> How would such a command look in VB? I would be interested in doing
>> something at the end of the userform that would save the document using a
>> filename generated from docproperty fields, something like:
>>
>> SaveAs <NAME>"-"<VERSION>.doc ..
>>
>> Could this be done ?
>>
>> "Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
>> news:OAUFu1awGHA.3364[ at ]TK2MSFTNGP02.phx.gbl...
>>> Add a SaveAs command to the code that transfers the data from the
>>> userform into the document so that the document has already been saved
>>> with the desired name before the user starts working in the body of the
>>> document itself. Then all that they have to do is click on Save or Yes
>>> when they attempt to exit the document.
>>>
>>> --
>>> Hope this helps.
>>>
>>> Please reply to the newsgroup unless you wish to avail yourself of my
>>> services on a paid consulting basis.
>>>
>>> Doug Robbins - Word MVP
>>>
>>> "Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> wrote in message
>>> news:en9HmqWwGHA.2260[ at ]TK2MSFTNGP03.phx.gbl...
>>>> I'm working on a UserForm for generating a letter to the referring
>>>> physician in response to a consultation. I generally name my documents
>>>> with the patient's last name and the date of the letter (e.g. Smith
>>>> 2006-08-16.doc) The UserForm, of course, gathers this info. When I
>>>> click Save or SaveAs I would like this to be the default filename. I
>>>> have tried putting this into the Title property
>>>> (BuiltInDocumentProperties("Title")), but it seems that changing the
>>>> title after the document is created from the template is too late (the
>>>> default name is the Title that was put in the template). Any other
>>>> suggestions?
>>>>
>>>> Thanks,
>>>>
>>>> Paul Warshawsky
>>>>
>>>
>>>
>>
>>
>
>


Re: SaveAs Default Name
"Marc Jurriens" <helmonder[ at ]hotmail.com> 04.09.2006 09:22:29
Done... I have put the line in the terminate section, this appears to work !

Thanks for your help !


"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:%23k58uIezGHA.3752[ at ]TK2MSFTNGP02.phx.gbl...
[Quoted Text]
> With ActiveDocument
> .SaveAs "Drive:\Path\" & A.CustomDocumentProperties("DocProp_1").Value
> & " - " & .CustomDocumentProperties("DocProp_2").Value & ".doc"
> End With
>
> or
>
> ActiveDocument.SaveAs "Drive:\Path\" & txtcontrol1.text & " - " &
> txtcontrol2.text & ".doc"
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Marc Jurriens" <helmonder[ at ]hotmail.com> wrote in message
> news:ezLtv5azGHA.2076[ at ]TK2MSFTNGP04.phx.gbl...
>> How would such a command look in VB? I would be interested in doing
>> something at the end of the userform that would save the document using a
>> filename generated from docproperty fields, something like:
>>
>> SaveAs <NAME>"-"<VERSION>.doc ..
>>
>> Could this be done ?
>>
>> "Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
>> news:OAUFu1awGHA.3364[ at ]TK2MSFTNGP02.phx.gbl...
>>> Add a SaveAs command to the code that transfers the data from the
>>> userform into the document so that the document has already been saved
>>> with the desired name before the user starts working in the body of the
>>> document itself. Then all that they have to do is click on Save or Yes
>>> when they attempt to exit the document.
>>>
>>> --
>>> Hope this helps.
>>>
>>> Please reply to the newsgroup unless you wish to avail yourself of my
>>> services on a paid consulting basis.
>>>
>>> Doug Robbins - Word MVP
>>>
>>> "Paul Warshawsky" <paulwarshawsky[ at ]vdn.ca> wrote in message
>>> news:en9HmqWwGHA.2260[ at ]TK2MSFTNGP03.phx.gbl...
>>>> I'm working on a UserForm for generating a letter to the referring
>>>> physician in response to a consultation. I generally name my documents
>>>> with the patient's last name and the date of the letter (e.g. Smith
>>>> 2006-08-16.doc) The UserForm, of course, gathers this info. When I
>>>> click Save or SaveAs I would like this to be the default filename. I
>>>> have tried putting this into the Title property
>>>> (BuiltInDocumentProperties("Title")), but it seems that changing the
>>>> title after the document is created from the template is too late (the
>>>> default name is the Title that was put in the template). Any other
>>>> suggestions?
>>>>
>>>> Thanks,
>>>>
>>>> Paul Warshawsky
>>>>
>>>
>>>
>>
>>
>
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net