Filename changes during save as from template

G

Guest

We have created a series of templates with file names similar to:-
0000 FM-DM-049-o1 agenda.dot
as part of a compliance procedure.
The idea being the four zeros are changed to the relevant job number but the
rest stays the same ( except dot becomes .doc) when the document is created.
This works fine if we right click on the template and 'open with' WORD, and
then save as , and changing the four zeros the document is saved as
1234 FM-DM-049-o1 agenda.doc. BUT
IF we double click on the template or use file>>>new in word, when we 'save
as' all we get is
0000 FM.doc as the filename the rest as been removed.
We have also created similar filenames in Excel and that works perfectly
whichever way you open the template.

Any one got an idea
 
G

Guest

Anne Thanks for the reply.

We have tried that and it does not work either.
We go into File >>> Properties and change the title to
1234 FM-DM-049-o1 agenda

when we save as

we get 1234 FM.doc

Can you suggest anything else, it is strange how it works perfectly in Excel

Malcolm
 
S

Suzanne S. Barnhill

Word picks up the filename from the title only up to the first
non-alphanumeric character.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 
G

Guest

Hi Suzanne
do you have any ideas how we can get round it, bearing in mind it works in
Excel and it works in word if we use a right click and 'open with' ( but this
is very awkward), which means word then doesn't take the filename from the
title up to the first non-alphanumeric character

regards
malcolm
 
M

Margaret Aldis

You could use a macro to set the filename before the first save - in fact
you could combine this with getting the user to enter the sequence number.

If you call your macro FileSave it will run whenever the user tries to save.
You'd have something like this:

Sub FileSave()
' Override for standard save command
If ActiveDocument.Path <> "" Then ' file has been saved before
ActiveDocument.Save
Else
Dim strJobNumber As String
strJobNumber = InputBox("Enter Job Number")
With Application.Dialogs(wdDialogFileSaveAs)
.Name = strJobNumber & " FM-DM-049-o1 agenda.doc"
.Show
End With
End If
End Sub

Put a macro of this type in each template - it will run for documents
created from that template.
 
G

Guest

Margeret
Thank you very much for your reply and input

I have added this macro to the template, and it works well

I will adapt this for the other templates

Thank you again

Malcolm
 

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