Filename field showing temp file info when emailed

P

Pauline Longmuir

I would like to email files with the Filename field but they show the temp
file info instead of the saved file info. Is there a switch that can be used
to ensure it shows the original file's info?
 
G

Graham Mayor

If you open a document directly from an e-mail message (which in any case is
bad practice) then if the filename field updates it will show the temporary
file location. You have no control over the remote user's configuration. The
answer is either to convert the field to text (CTRL+SHIFT+F9) or insert it
as text in the first place using a macro e.g.

Sub InsertFileNameAndPath()
Dim fFname As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
fFname = .FullName
End With
Selection.TypeText fFname
End Sub

OR

Sub InsertFilenameOnly()
Dim fFname As String
With ActiveDocument
If Len(.Path) = 0 Then
.Save
End If
fFname = .name
End With
Selection.TypeText fFname
End Sub

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

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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