Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3273634
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:57:09+00:00 2026-05-17T18:57:09+00:00

Working in Office 2007, I’d like to add a filename field in my document

  • 0

Working in Office 2007, I’d like to add a filename field in my document header. The document will later be a PDF, so I don’t want the extension.

I’ve played with Insert -> QuickParts -> Field, to no avail. I’ve got a gut feeling that it requires a formula…

Thanks in advance if you can help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T18:57:10+00:00Added an answer on May 17, 2026 at 6:57 pm

    Your feeling is quite right.

    Insert > QuickParts > Field > FileName is the way to go, but as you see from the screenshot below, you do not have the option to turn the file extension on or off.
    alt text
    To show or not to show (Shakespearean style) the extension is purely up to the Windows Explorer setting to show or hide known file extensions. So, either you change that setting or you need some code.

    A very simple Macro would be the following:

    Sub InsertCurrentFileName()
        Selection.InsertBefore Text:=Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 4)
    End Sub
    

    What it does is simply strip the last 4 characters of the “Filename string” e.g. “.doc” – if you safe a “.docx” the “.” would be preserved. Also this Macro would run once and you would need to run it again when the filename changes.

    Maybe you could explain some more what you want to achieve with having the filename in the document header? Are you trying to use the filename in the document header to set some PDF property during conversion? Why not use the Document Title? Do you need the original filename in the PDF later – why?

    Two more pages to help you with your problem (both relying on Macros…):

    • insert filename without extension .doc using fields?
    • Inserting a File Name without an Extension
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am working on a Office Word add-in for Word 2003. When I reopen
I am working with VBA, in Microsoft Office 2007 and 2003 (Word specifically). What
I am currently working on an office add-in and I need to show a
I am working on Microsoft office infopath 2007.I have inserted the controls as text
I'm working on an Open Office document with a partner and we are using
I'm working on an Excel 2003 addin (users will upgrade to newer Office, but
I'm working on a back office project - I first implemented add, update and
I am working on a project, and I need something like office web app
I'm working with the Office Interop and having trouble inserting page breaks in Excel.
I am working on a display screen for our office, and I can't seem

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.