Reply
 
Thread Tools Display Modes
  #1   Report Post  
Dbltap
 
Posts: n/a
Default How do a make a doc save based on a text field?

Is there a way to make a form base the save as name on the text in a specific
text box? I couldn't find this by searching.

Thanks.
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

Dim fname as string
fname = ActiveDocument.Formfields("filenameformfieldname") .Result
ActiveDocument.SaveAs fname

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Is there a way to make a form base the save as name on the text in a
specific
text box? I couldn't find this by searching.

Thanks.



  #3   Report Post  
Dbltap
 
Posts: n/a
Default

Ok, I think this is what I need. I followed instructions on the MVP site on
what to do with macros others sent and I created the macro in the template I
want this to work in. I then went into the text box properties for that field
and selected the macro I created to run on exit of that box and checked
calculate on exit but it still doesn't work.

The save name it always gives me is my old home address and I can not figure
out where it is getting this from. Is there a macro running that I don't know
about or am I missing something really basic? If you can't tell I'm new to
macros.

Thanks again.


"Doug Robbins" wrote:

Dim fname as string
fname = ActiveDocument.Formfields("filenameformfieldname") .Result
ActiveDocument.SaveAs fname

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Is there a way to make a form base the save as name on the text in a
specific
text box? I couldn't find this by searching.

Thanks.




  #4   Report Post  
Doug Robbins
 
Posts: n/a
Default

I assume that you replace "filenameformfieldname" with the actual name of
the bookmark assigned to the formfield?

If you run a macro containing the following code on exit from the formfield,
what is displayed in the message box:

MsgBox ActiveDocument.Formfields("filenameformfieldname") .Result


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Ok, I think this is what I need. I followed instructions on the MVP site
on
what to do with macros others sent and I created the macro in the template
I
want this to work in. I then went into the text box properties for that
field
and selected the macro I created to run on exit of that box and checked
calculate on exit but it still doesn't work.

The save name it always gives me is my old home address and I can not
figure
out where it is getting this from. Is there a macro running that I don't
know
about or am I missing something really basic? If you can't tell I'm new to
macros.

Thanks again.


"Doug Robbins" wrote:

Dim fname as string
fname = ActiveDocument.Formfields("filenameformfieldname") .Result
ActiveDocument.SaveAs fname

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Is there a way to make a form base the save as name on the text in a
specific
text box? I couldn't find this by searching.

Thanks.






  #5   Report Post  
Dbltap
 
Posts: n/a
Default

Ok I figured out my mistake, thanks Doug. Now if I wanted it to have
something added in front of the text from the named field, i.e. "P&D Report"
and then the field name how would I do that?

Thanks again for putting up with my dumb questions.

Chris


"Doug Robbins" wrote:

I assume that you replace "filenameformfieldname" with the actual name of
the bookmark assigned to the formfield?

If you run a macro containing the following code on exit from the formfield,
what is displayed in the message box:

MsgBox ActiveDocument.Formfields("filenameformfieldname") .Result


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Ok, I think this is what I need. I followed instructions on the MVP site
on
what to do with macros others sent and I created the macro in the template
I
want this to work in. I then went into the text box properties for that
field
and selected the macro I created to run on exit of that box and checked
calculate on exit but it still doesn't work.

The save name it always gives me is my old home address and I can not
figure
out where it is getting this from. Is there a macro running that I don't
know
about or am I missing something really basic? If you can't tell I'm new to
macros.

Thanks again.


"Doug Robbins" wrote:

Dim fname as string
fname = ActiveDocument.Formfields("filenameformfieldname") .Result
ActiveDocument.SaveAs fname

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Is there a way to make a form base the save as name on the text in a
specific
text box? I couldn't find this by searching.

Thanks.








  #6   Report Post  
Doug Robbins
 
Posts: n/a
Default

Replace

fname = ActiveDocument.Formfields("filenameformfieldname") .Result

with

fname = "P&D Report" &
ActiveDocument.Formfields("filenameformfieldname") .Result

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Ok I figured out my mistake, thanks Doug. Now if I wanted it to have
something added in front of the text from the named field, i.e. "P&D
Report"
and then the field name how would I do that?

Thanks again for putting up with my dumb questions.

Chris


"Doug Robbins" wrote:

I assume that you replace "filenameformfieldname" with the actual name of
the bookmark assigned to the formfield?

If you run a macro containing the following code on exit from the
formfield,
what is displayed in the message box:

MsgBox ActiveDocument.Formfields("filenameformfieldname") .Result


--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Ok, I think this is what I need. I followed instructions on the MVP
site
on
what to do with macros others sent and I created the macro in the
template
I
want this to work in. I then went into the text box properties for that
field
and selected the macro I created to run on exit of that box and checked
calculate on exit but it still doesn't work.

The save name it always gives me is my old home address and I can not
figure
out where it is getting this from. Is there a macro running that I
don't
know
about or am I missing something really basic? If you can't tell I'm new
to
macros.

Thanks again.


"Doug Robbins" wrote:

Dim fname as string
fname = ActiveDocument.Formfields("filenameformfieldname") .Result
ActiveDocument.SaveAs fname

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a
paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
"Dbltap" wrote in message
...
Is there a way to make a form base the save as name on the text in a
specific
text box? I couldn't find this by searching.

Thanks.








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
help, problem with text field in word 2003 Salvatore Microsoft Word Help 1 January 21st 05 03:40 PM
How do you force a Save As in a Word based form? Diane R. Microsoft Word Help 2 January 12th 05 05:59 PM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM
Text Form Field Ref in Footer Won't Update on Screen StarWine Microsoft Word Help 3 December 6th 04 06:17 PM
Auto Jump Text Field to Text Field jhnbernhard Tables 1 November 17th 04 02:13 PM


All times are GMT +1. The time now is 12:46 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"