#1   Report Post  
Posted to microsoft.public.word.docmanagement
DickV
 
Posts: n/a
Default file naming

I've set up a template with a couple of parameters that are entered using
FILLIN when a new doc is created from the template.
Is there some way of using these parameters to set the file name when the
new doc is saved for the first time?

Never used VBA .. but all advice welcomed!

Thanks in advance
Dick V
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Cindy M -WordMVP-
 
Posts: n/a
Default file naming

Hi ?B?RGlja1Y=?=,

I've set up a template with a couple of parameters that are entered using
FILLIN when a new doc is created from the template.
Is there some way of using these parameters to set the file name when the
new doc is saved for the first time?

Never used VBA .. but all advice welcomed!

It would certainly require VBA. You'd need to select each of the Fillin
fields and assign them bookmarks. Then the macro can pick up the content
fairly easily. Example:

Sub FileSaveAs
Dim fileName as String
Dim doc as Word.Document

Set doc = ActiveDocument
fileName = doc.Bookmarks("FirstPart").Range.Text _
& doc.Bookmarks("SecondPart").Range.Text & ".doc"
doc.SaveAs fileName
End Sub

Where "FirstPart" and "SecondPart" represent bookmark names assigned in
Insert/Bookmark

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 :-)

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
merge instructions from text file Steve Mailmerge 8 November 26th 05 03:31 AM
File naming specifications / Invalid file name HRM Microsoft Word Help 3 October 17th 05 10:35 PM
How do I prevent Word from locking the file? Scott Bass New Users 0 October 5th 05 05:20 PM
open file talbert Microsoft Word Help 1 May 3rd 05 03:14 PM
File Corruption problems Frustrated Page Layout 2 December 3rd 04 09:47 PM


All times are GMT +1. The time now is 05:16 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"