Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Incorporate Input Box User Response for Naming of File

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Incorporate Input Box User Response for Naming of File

On Sat, 12 Jan 2008 16:14:00 -0800, RPMitchal
wrote:

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod


See http://www.word.mvps.org/FAQs/Macros...tainFolder.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Incorporate Input Box User Response for Naming of File

Jay:

Thanks so very much. I haven't had a chance yet to put this macro into
practice, but I am absolutely sure that not only will it be of tremendous
assistance, but that it will be yet another step in my on-going commitment
towards not only learning the ins and outs of VBA programming for Word, but
additionally towards understanding and appreciating how it is that you guys
know what you do.

Thanks again - Rod


"Jay Freedman" wrote:

On Sat, 12 Jan 2008 16:14:00 -0800, RPMitchal
wrote:

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod


See http://www.word.mvps.org/FAQs/Macros...tainFolder.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Incorporate Input Box User Response for Naming of File

Jay:

Although I copied and have been trying to use the code from the link you
suggested, I find that somehow I am restricted from actually saving the
document and as of yet have not been able to get past...

*MsgBox "documents can't be saved in that folder. Please try again."*

I have tried any number of naming combinations or conventions to get by
whatever restriction exists within the code yet it continues to elude me.

My guess would be that it has everything to do with...

If LCase$(Left$(CurDir, 20)) "c:\my documents\test" Then
MsgBox "Documents can't be saved in that folder. Please try
again."
Exit Sub
End If

....and I'm not sure what steps I need to take in naming the file to get
beyond the MsgBox, nor am I sure as to what the purpose of the restrictive
coding might be.

Thanks in advance - yet again - Rod

"RPMitchal" wrote:

Jay:

Thanks so very much. I haven't had a chance yet to put this macro into
practice, but I am absolutely sure that not only will it be of tremendous
assistance, but that it will be yet another step in my on-going commitment
towards not only learning the ins and outs of VBA programming for Word, but
additionally towards understanding and appreciating how it is that you guys
know what you do.

Thanks again - Rod


"Jay Freedman" wrote:

On Sat, 12 Jan 2008 16:14:00 -0800, RPMitchal
wrote:

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod


See http://www.word.mvps.org/FAQs/Macros...tainFolder.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Jay Freedman Jay Freedman is offline
external usenet poster
 
Posts: 9,854
Default Incorporate Input Box User Response for Naming of File

You're supposed to replace the path in double quotes with the (all lower case)
actual path that you want the document to be saved in; and you replace the 20
with the number of characters in that path. For example, if you wanted the
document to be saved in the folder C:\Temp (which contains 7 characters), then
you would change the line of code to

If LCase$(Left$(CurDir, 7)) "c:\temp" Then

The purpose of it is to make sure the user didn't change the path shown in the
dialog to something other than the path to be enforced.

On Mon, 14 Jan 2008 16:12:00 -0800, RPMitchal
wrote:

Jay:

Although I copied and have been trying to use the code from the link you
suggested, I find that somehow I am restricted from actually saving the
document and as of yet have not been able to get past...

*MsgBox "documents can't be saved in that folder. Please try again."*

I have tried any number of naming combinations or conventions to get by
whatever restriction exists within the code yet it continues to elude me.

My guess would be that it has everything to do with...

If LCase$(Left$(CurDir, 20)) "c:\my documents\test" Then
MsgBox "Documents can't be saved in that folder. Please try
again."
Exit Sub
End If

...and I'm not sure what steps I need to take in naming the file to get
beyond the MsgBox, nor am I sure as to what the purpose of the restrictive
coding might be.

Thanks in advance - yet again - Rod

"RPMitchal" wrote:

Jay:

Thanks so very much. I haven't had a chance yet to put this macro into
practice, but I am absolutely sure that not only will it be of tremendous
assistance, but that it will be yet another step in my on-going commitment
towards not only learning the ins and outs of VBA programming for Word, but
additionally towards understanding and appreciating how it is that you guys
know what you do.

Thanks again - Rod


"Jay Freedman" wrote:

On Sat, 12 Jan 2008 16:14:00 -0800, RPMitchal
wrote:

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod

See http://www.word.mvps.org/FAQs/Macros...tainFolder.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.


  #6   Report Post  
Posted to microsoft.public.word.docmanagement
RPMitchal RPMitchal is offline
external usenet poster
 
Posts: 135
Default Incorporate Input Box User Response for Naming of File

Jay:

As you might guess, the miscalculation was on my part, taking the supplied
coding and your additional comments into account, I was able to modify the
coding to do just what I needed.

Thanks so very much for your assistance. I really do appreciate it.

Rod

"Jay Freedman" wrote:

You're supposed to replace the path in double quotes with the (all lower case)
actual path that you want the document to be saved in; and you replace the 20
with the number of characters in that path. For example, if you wanted the
document to be saved in the folder C:\Temp (which contains 7 characters), then
you would change the line of code to

If LCase$(Left$(CurDir, 7)) "c:\temp" Then

The purpose of it is to make sure the user didn't change the path shown in the
dialog to something other than the path to be enforced.

On Mon, 14 Jan 2008 16:12:00 -0800, RPMitchal
wrote:

Jay:

Although I copied and have been trying to use the code from the link you
suggested, I find that somehow I am restricted from actually saving the
document and as of yet have not been able to get past...

*MsgBox "documents can't be saved in that folder. Please try again."*

I have tried any number of naming combinations or conventions to get by
whatever restriction exists within the code yet it continues to elude me.

My guess would be that it has everything to do with...

If LCase$(Left$(CurDir, 20)) "c:\my documents\test" Then
MsgBox "Documents can't be saved in that folder. Please try
again."
Exit Sub
End If

...and I'm not sure what steps I need to take in naming the file to get
beyond the MsgBox, nor am I sure as to what the purpose of the restrictive
coding might be.

Thanks in advance - yet again - Rod

"RPMitchal" wrote:

Jay:

Thanks so very much. I haven't had a chance yet to put this macro into
practice, but I am absolutely sure that not only will it be of tremendous
assistance, but that it will be yet another step in my on-going commitment
towards not only learning the ins and outs of VBA programming for Word, but
additionally towards understanding and appreciating how it is that you guys
know what you do.

Thanks again - Rod


"Jay Freedman" wrote:

On Sat, 12 Jan 2008 16:14:00 -0800, RPMitchal
wrote:

Word 2003

I would like to use an Input Box within a procedure that asks the question:
"What would you like to name this file?"

I would additionally like to incorporate and concatenate the user's response
to this question as the file name within the path for saving the document.
I.e., C:\folder name\*User's Response*.doc.

Thanks so much in advance for any assistance in this regard.

Rod

See http://www.word.mvps.org/FAQs/Macros...tainFolder.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.


--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.

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
How populate a document with user input? Wordsmth Microsoft Word Help 6 June 1st 06 06:13 AM
Pause Merge for User Input sstires Mailmerge 1 March 23rd 06 06:51 PM
file naming DickV Microsoft Word Help 1 January 6th 06 02:08 PM
File naming specifications / Invalid file name HRM Microsoft Word Help 3 October 17th 05 10:35 PM
input user value nash Microsoft Word Help 2 September 12th 05 05:17 AM


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