If the Policy information is contained in the document, then it would be
possible to extract it from there, save the document in the correct
location, and thus avoid the user having to screw up anything.
How many policies are there?
Are all the documents laid out the same?
Is there anything in the documents that identifies the Policy type?
Is it in the same place in each document?
If the documents are similar, perhaps you could send me one (with dummy
information) to the link on my web site, with a covering note explaining how
it works?
Otherwise adding a box for the user to select the document type - and thus
the save location would not be too difficult to arrange e.g.
Sub SaveAs()
Dim iPolicy As String
Dim PolPath As String
Dim pStr As String
Start:
pStr = "R:\Governance\Policy\"
iPolicy = InputBox("Enter the number of the document type:" & vbCr & _
vbCr & "1. Corporate Services" & vbCr & _
"2. Financial Management" & vbCr & _
"3. Relationship Management", "Policy Type", 1)
Select Case iPolicy
Case Is = 1
PolPath = "Corporate Services\"
Case Is = 2
PolPath = "Financial Management\"
Case Is = 3
PolPath = "Relationship Management\"
Case Else
MsgBox "The number entered is not valid!", vbCritical, "Error!"
GoTo Start
End Select
pStr = pStr & PolPath & _
ActiveDocument.Bookmarks("bktitle").Range.Text _
& " Draft.doc"
ActiveDocument.SaveAs FileName:=pStr
End Sub
You could create a userform insteadof the InputBox with radio buttons which
would be neater, but more difficult to convey in a forum like this.
For the basics, see Word MVP FAQ - Userforms
http://word.mvps.org/FAQs/Userforms.htm
for a more in depth explanation, see
http://gregmaxey.mvps.org/Create_and_employ_a_UserForm.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>