PC Review


Reply
Thread Tools Rate Thread

How can I automatically add document title at end of document?

 
 
teknon
Guest
Posts: n/a
 
      12th Oct 2009
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 With Quote
 
 
 
 
Herb Tyson [MVP]
Guest
Posts: n/a
 
      12th Oct 2009
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" <(E-Mail Removed)> wrote in message
news:A5034EFC-0799-4A53-8098-(E-Mail Removed)...
> 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 With Quote
 
Graham Mayor
Guest
Posts: n/a
 
      13th Oct 2009
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Is there a way to get Word 2007 to automatically prompt the user to fill out a document summary when saving a new document? Suzanne S. Barnhill Microsoft Word New Users 0 5th Jan 2011 02:28 AM
How do I show the document title bar on a microsoft word document? David D. Microsoft Word Document Management 1 1st Mar 2010 06:12 AM
I can remove document but not document title in vista word - help Brenda Microsoft Word Document Management 2 4th Jul 2008 07:29 AM
How to copy automatically a title from an another document. Nandi Microsoft Word Document Management 1 4th Dec 2007 10:03 AM
ASP->ASP.NET conversion of document.title and document.getElementById - C# newbie. Frank Nero Microsoft C# .NET 1 30th May 2004 11:02 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:57 PM.