Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word 2000 template help 1

Status
Not open for further replies.

GolfNFool18

Programmer
May 5, 2002
6
US
Hello All,

Ia m trying to create a Statement of Work (SOW) template for my company. I have already created the SOW.dot template file. I use the ASK and the REF commands to ask the questions that fill in the necessary areas of the SOW with redundant information.

What I'd also like to do is have a macro or some way of saving the new document created from the template with a filename that is a concatenation of two fields from the ASK statements. All of my bookmarks and REF statements are filling in properly, but, I can't seem to figure out how to save the document after all of the ASK statements have garnered the information from the user creating the new SOW.

Currently, my user chooses NEW from the FILE menu and chooses the SOW.dot template. This opens to a Word document with a Document # as the file name and then proceeds to ask all of the questions from the ASK statements. What I'd like to do is have a macro that runs, after the ASK statements have filled in all of the REF fields, that names the document after three of the REF fields ( custname, custheader, and a customized date field).

Is there a good way to accomplish this?

Thanks,

Troy
 
Try

Sub Saveit()
'
' Saveit Macro
' Macro written 18/01/2002 by Neil Berryman
'
Dim fname As String

'ChangeFileOpenDirectory "C:\My Documents\"
fname = ActiveDocument.FormFields("FssStaffNo").Result
'MsgBox fname
ActiveDocument.SaveAs fname
End Sub

I have a Word template that allows users to fill in a form and then return it to a set mail box. If you let me have your e mail I will send it on to you

Reegards

Neil Berryman
IT Trainer
neil_berryman@btopenworld.com
 
Neil,

Thanks. I made a few mods and this works for me! I'd love to have a copy of your template as I have a few other template projects I'm going to be working on. My email addy is below.

Thanks,

Troy Gregory
IT Consultant
troy.gregory@merkurgroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top