Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
insert filename without extension .doc using fields?
Does anybody know how to insert a document file name and NOT include the file
name extesion eg ".doc". Surely there is a switch so the filename can be shown without the extension? |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
insert filename without extension .doc using fields?
There is a "switch," but it's in Windows and applies to all files.
-- 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. "Maroubramick" wrote in message ... Does anybody know how to insert a document file name and NOT include the file name extesion eg ".doc". Surely there is a switch so the filename can be shown without the extension? |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
insert filename without extension .doc using fields?
The following macros will insert the document name or document path and name
without the extension - add to keystroke shortcuts or toolbar buttons http://www.gmayor.com/installing_macro.htm Sub InsertfNameAndPath() Dim pPathname As String With ActiveDocument If Len(.Path) = 0 Then .Save End If If Right(.Name, 1) = "x" Then pPathname = Left$(.FullName, (Len(.FullName) - 5)) Else pPathname = Left$(.FullName, (Len(.FullName) - 4)) End If End With Selection.TypeText pPathname End Sub Sub InsertFnameOnly() Dim pPathname As String With ActiveDocument If Len(.Path) = 0 Then .Save End If If Right(.Name, 1) = "x" Then pPathname = Left$(.Name, (Len(.Name) - 5)) Else pPathname = Left$(.Name, (Len(.Name) - 4)) End If End With Selection.TypeText pPathname End Sub -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Maroubramick wrote: Does anybody know how to insert a document file name and NOT include the file name extesion eg ".doc". Surely there is a switch so the filename can be shown without the extension? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
field code to return the filename without the extension | Microsoft Word Help | |||
How can I remove the .doc file extension in a FILENAME field? | Microsoft Word Help | |||
Can I insert a filename when I insert a picture into word? | Microsoft Word Help | |||
Insert > Autotext is missing "filename" and "filename and path"; how to get back? | New Users | |||
Can I display the FILENAME in word without the .doc extension? | Microsoft Word Help |