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

  • SEARCH
  • Home
  • 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 311887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:57:57+00:00 2026-05-12T07:57:57+00:00

Without opening Windows Explorer. I want to check for this from Word VBA. Thanks.

  • 0

Without opening Windows Explorer. I want to check for this from Word VBA.

Thanks.

EDIT:

This code works now:

Set WshShell = CreateObject("WScript.Shell")

If WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt") = 0 Then
    MsgBox Prompt:="In Windows Explorer, set the folder options to hide file extensions of known file types." _
        & vbCrLf & vbCrLf & " This prevents the file extension from appearing as part of the document number in" _
        & "the document body and page headers.", Buttons:=vbOKOnly + vbCritical, Title:="Critical"
End If
  • 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-12T07:57:57+00:00Added an answer on May 12, 2026 at 7:57 am

    You need to query the registry value

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\HideFileExt

    Extensions are shown if this value is 0 and hidden if it is 1.

    You can use the RegRead method on the WshShell object to read this value. You can add an reference to the Windows Script Host Object Model type library in your VBA project to get strong typing when you use the WshShell object.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem with opening word document from ASP.NET site. The solution works
Without having to write VBA code, is there a way to maybe write a
How can you use imagemagick from python without opening a new command line window
I have a Solution X. In windows explorer this is the solution folder: I
Without going into whether this is a good or bad idea: Is it possible
Without help from additional container (like vector), is it possible that I can make
I'm using rundll32 url.dll,FileProtocolHandler my_file.dotx to open files under Windows. It works fine with
I ported a little Haskell program I wrote from Mac to Windows. It's a
I am using following code to select a file to import in a Windows
I am converting several VBA projects to Windows form applications. The only problem I

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.