Saving an open word document to a specific file directory with user input for file name

fireman112473

New Member
Joined
May 9, 2017
Messages
8
I am trying to create a macro that will allow me to open a word file and immediately save it as a new file in a specific file directory. Below is how far I have gotten. I can save to a specific file directory with a predetermined name, but can't get it to allow for user input for new file name.

Sub IL09NFPA722010()
Documents.Open FileName:="S:\Data\FORMS\Master Plan Review Letters\2009 IBC and MBC Forms\Illinois\IL Alarm PR Letter IBC 2009 NFPA 2010.docx", ReadOnly:=True
ActiveDocument.SaveAs FileName:="S:\Employee Folders\Scott McBride\0 2017 Plan Review Letters" & "doc1", Fileformat:=wdFormatXMLDocument
End Sub

I want a user input for the area shown in bold.

Thanks
Scott
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Well, as this forum is called MrExcel - I don't know how they feel about Word questions - but I'm sure the mods will answer that one.
Just to clarify any confusion - we have no problem with people posting Word questions. They should be posted in the "General Excel Discussion & Other Questions" forum (not in the "Excel Questions" forum), and you will want to be sure to include that it is a Word question in the Title or original question, to remove any doubt.

Paul is a Word MVP, and is one of of most knowledgeable posters on Word questions.
 
Upvote 0
Just to clarify any confusion - we have no problem with people posting Word questions. They should be posted in the "General Excel Discussion & Other Questions" forum (not in the "Excel Questions" forum), and you will want to be sure to include that it is a Word question in the Title or original question, to remove any doubt.

Paul is a Word MVP, and is one of of most knowledgeable posters on Word questions.

Thank you for the clarification. I'll admit, it was my mistake not realizing where the thread was posted. I generally poke through the "zero reply posts" and it slipped my mind that it could come from other portions of the forum, as I generally only participate in the "Excel Questions" section.
When I read the question (and title), it just didn't dawn on me that the user was not using Excel and instead needed the code in Word itself. Next time I will look closely to see where it was posted.

Thanks again.
 
Upvote 0

Forum statistics

Threads
1,223,793
Messages
6,174,635
Members
452,575
Latest member
Fstick546

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top