Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
teknon teknon is offline
external usenet poster
 
Posts: 1
Default How can I automatically add document title at end of document?

I use to use Corel. After naming a document, I could automatically add the
document name at the end of a document. I remember that it was different
than an endnote.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Herb Tyson [MVP] Herb Tyson [MVP] is offline
external usenet poster
 
Posts: 2,936
Default How can I automatically add document title at end of document?

You can use the filename field, adding the \p switch if you also want the
path.

One way to do this is to press Ctrl+F9, type filename (or filename \p), then
press F9.

Another way is to choose Insert tab, Quick Parts, Field, select FileName
(tick Add path to filename if desired), and click OK. (This presumes Word
2007... if you're using Word 2003 or earlier, then choose Insert - Field,
instead).

--

Herb Tyson MS MVP
Author of the Word 2007 Bible
Blog: http://word2007bible.herbtyson.com
Web: http://www.herbtyson.com


"teknon" wrote in message
...
I use to use Corel. After naming a document, I could automatically add
the
document name at the end of a document. I remember that it was different
than an endnote.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How can I automatically add document title at end of document?

The following macro will both save the document and insert the filename and
path at the end. If you want just the name change the instances of .Fullname
to .Name. If you change the name of the document or the file location,
re-run the macro.

Sub InsertFileNameAtEnd()
With ActiveDocument
If Len(.Path) = 0 Then .Save
If InStr(1, .Range.Paragraphs.Last.Range.Text, _
".doc") = False Then
.Range.InsertAfter vbCr & .FullName
With .Range.Paragraphs.Last.Range
.Paragraphs.Alignment = _
wdAlignParagraphRight
.Font.name = "Arial"
.Font.Size = 8
End With
Else
.Range.Paragraphs.Last.Range.Text = _
.FullName
End If
End With
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



teknon wrote:
I use to use Corel. After naming a document, I could automatically
add the document name at the end of a document. I remember that it
was different than an endnote.



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
How do I centre a title at the top of a document? Shari Page Layout 2 August 24th 09 05:24 PM
I can remove document but not document title in vista word - help Brenda Microsoft Word Help 2 July 4th 08 07:29 AM
How to copy automatically a title from an another document. Nandi Microsoft Word Help 1 December 4th 07 10:03 AM
How do I center a title and not the whole document? Benmara Page Layout 1 June 13th 07 02:07 AM
How to automatically add chapter title to header? Paul Moore New Users 3 June 9th 05 03:01 PM


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