Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Mike Petrusko
 
Posts: n/a
Default How can I remove the .doc file extension in a FILENAME field?

I am currently using word 2002 sp2, and documents that were created using an
older version of word have FILENAME fields in them, when this field updates
word adds the file extension into the field. I would like this not to
happen. Any help?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill
 
Posts: n/a
Default How can I remove the .doc file extension in a FILENAME field?

Whether Word adds the file extension or not is based on your Windows display
settings.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Mike Petrusko" Mike wrote in message
...
I am currently using word 2002 sp2, and documents that were created using

an
older version of word have FILENAME fields in them, when this field

updates
word adds the file extension into the field. I would like this not to
happen. Any help?


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor
 
Posts: n/a
Default How can I remove the .doc file extension in a FILENAME field?

If you want to retain the display of extensions for your filing system
(which is not a bad plan) then you can use a macro to insert the filenames
or filenames and path using macros. If you select the field in the document
then run the appropriate macro it will be overwritten with the filename as
text without the extension. Obviously it will not update if you change the
filename. The same macro can be used to insert the filename at the cursor in
new documents.

Sub InsertfNameAndPath()
Dim pPathname As String
With ActiveDocument
If Not .Saved Then
.Save
End If
pPathname = Left$(.FullName, (Len(.FullName) - 4))
End With
Selection.TypeText pPathname
End Sub

Sub InsertFnameOnly()
Dim pPathname As String
With ActiveDocument
If Not .Saved Then
.Save
End If
pPathname = Left$(.Name, (Len(.Name) - 4))
End With
Selection.TypeText pPathname
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




Suzanne S. Barnhill wrote:
Whether Word adds the file extension or not is based on your Windows
display settings.


"Mike Petrusko" Mike wrote in
message ...
I am currently using word 2002 sp2, and documents that were created
using an older version of word have FILENAME fields in them, when
this field updates word adds the file extension into the field. I
would like this not to happen. Any help?



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
Insert source texts into multiple files and update automatically robfer Microsoft Word Help 9 September 12th 07 10:10 PM
Word crashes while opening .doc file Rachelle Read Microsoft Word Help 1 July 18th 05 02:53 PM
mailmerge - excel datasource - other file extension? Ralf Pickel Mailmerge 1 February 14th 05 08:05 PM
Can I display the FILENAME in word without the .doc extension? Mr P Microsoft Word Help 1 January 15th 05 10:45 AM
How do I change auto text to include the .Doc after the file name. auto text, filenames Microsoft Word Help 1 January 13th 05 10:05 PM


All times are GMT +1. The time now is 07:02 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"