Home |
Search |
Today's Posts |
#1
|
|||
|
|||
How do I make this macro add text in front...
I was given this great macro to create the file name based off of a specific
field in a form but how would I modify it to add a set name in front of the form info? Here is the macro: Dim fname as string fname = ActiveDocument.Formfields("filenameformfieldname") .Result ActiveDocument.SaveAs fname Right now the field is a number i.e. 4856, and I would like it to have it save as €œP&D Report 4856.doc€ What would I add? Thanks, this forum is great! Chris |
#2
|
|||
|
|||
Chris,
Something like: Dim fname As String Dim fVar As String fVar = ActiveDocument.FormFields("filenameformfield").Res ult fname = "Whatever you like " & fVar ActiveDocument.SaveAs fname |
#3
|
|||
|
|||
Thanks Greg! Just what I needed. One of these day's I'll get the hang of it
but right now macros's are all french to me "Greg" wrote: Chris, Something like: Dim fname As String Dim fVar As String fVar = ActiveDocument.FormFields("filenameformfield").Res ult fname = "Whatever you like " & fVar ActiveDocument.SaveAs fname |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do a make a doc save based on a text field? | Page Layout | |||
How to use make a macro active | Microsoft Word Help | |||
How can I make the text that Iam printing larger ? | Page Layout | |||
How do you make text wrap in a paragraph? | Microsoft Word Help | |||
Outline | Page Layout |