Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Page Layout / September 2006

Tip: Looking for answers? Try searching our database.

Filename in header without ".doc"

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James Kendall - 06 Sep 2006 21:54 GMT
Is there a way to get the Filename to show up without the ending ".doc"?
If there is can you please let me know how to do it.
Signature

Thank you for your time.
Windows XP
Office 2002

Suzanne S. Barnhill - 06 Sep 2006 22:47 GMT
Only if you don't have file extensions displayed on your machine. And this
is no guarantee that the extension will not be displayed on another machine
on which they are not hidden.

Signature

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.

> Is there a way to get the Filename to show up without the ending ".doc"?
> If there is can you please let me know how to do it.
James Kendall - 07 Sep 2006 12:47 GMT
Alternately speaking is there a way to only show the first 6 characters of
the filename using a macro or something.  The way the files are I could get
away with doing it this way and accomplish the same thing.
Signature

Thank you for your time.
Windows XP
Office 2002

> Only if you don't have file extensions displayed on your machine. And this
> is no guarantee that the extension will not be displayed on another machine
> on which they are not hidden.
>
> > Is there a way to get the Filename to show up without the ending ".doc"?
> > If there is can you please let me know how to do it.
Graham Mayor - 07 Sep 2006 13:34 GMT
If you want the filename in the document then insert it with one of the
following macros

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

If you want it in the Word Window header see Jezebel's answer
http://www.gmayor.com/installing_macro.htm
Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

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

> Alternately speaking is there a way to only show the first 6
> characters of the filename using a macro or something.  The way the
[quoted text clipped - 20 lines]
>>> Windows XP
>>> Office 2002
Jezebel - 07 Sep 2006 01:54 GMT
ActiveWindow.Caption =
Left(ActiveWindow.Caption,Len(ActiveWindow.Caption)-4)

> Is there a way to get the Filename to show up without the ending ".doc"?
> If there is can you please let me know how to do it.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.