Hide text in MSWord 2013 using macro

Discussion in 'Word' started by Creative_works, Dec 12, 2016.

  1. Creative_works


    Dec 12, 2016
    Likes Received:
    Hey everyone,
    I am wanting to make a word document for a friend of mine kind of a surprise gift to her. I was wanting to create a document that would hide the text until a certain date was true or if the correct password was entered. I was thinking I could use an ActiveX checkbox that when checked it would prompt her with a message saying "document section is visible at xx/xx/xxxx or type in password: "
    I was planing on using a simple If then statement with the hideselection = true or false depending if the datevalue matched the date. However, I am very new to programming in VBA, so if anyone knows any information that would help me achieve this or the projects probability I would be very grateful.
    Thanks and Happy Holidays!
    Creative_works, Dec 12, 2016
    1. Advertisements

  2. Creative_works

    macropod Microsoft MVP

    Mar 2, 2012
    Likes Received:
    You can't reliably hide text that way in Word. Simply formatting it has hidden doesn't mean the other person won't be able to see - or print (even without seeing) - the hidden text. That's because Word's hidden text display and print settings are controlled by the users Word configuration. For example, simply clicking on the ΒΆ symbol on the Ribbon's home tab will toggle hidden text display on/off. That said, there are ways to conditionally dislpay/print content. See, for example, Use Date (And/Or Time) Comparisons To Vary Text in my Microsoft Word Date Calculation Tutorial, at:
    Do read the document's introductory material.
    macropod, Dec 12, 2016
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.