Filename from a form label.

S

sadsfan

I have a userform in Word, When I click 'save as' is there a macro (That I
can link to a custom save as button) to ensure that the filename is taken
from the first text label in a form?
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?c2Fkc2Zhbg==?=,
I have a userform in Word, When I click 'save as' is there a macro (That I
can link to a custom save as button) to ensure that the filename is taken
from the first text label in a form?
Name the macro FileSaveAs and it will run when the button is clicked. Example
to pick up the text in a form field named "XYZ"

Sub FileSaveAs()
With Dialogs(wdDialogFileSaveAs)
.Name = ActiveDocument.Formfields("XYZ").Result
.Show
End With
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top