View Single Post
 
Old 11-09-2015, 04:19 PM
Eduardo Care Eduardo Care is offline Windows 8 Office 2010 64bit
Advanced Beginner
 
Join Date: Aug 2015
Location: Cali
Posts: 32
Eduardo Care is on a distinguished road
Default

Hi Paul i end up using the second alternative you suggest me, for anyone interested ill leave the code:

Code:
Sub FilePrint()
    With Application.ActiveDocument
        If .ProtectionType <> wdNoProtection Then _
        .Unprotect Password:="Password"
        With ActiveDocument
            .Styles("TEST1").Font.Hidden = True
            Application.ScreenRefresh
            Dialogs(wdDialogFilePrint).Show
            .Styles("TEST1").Font.Hidden = False
         .Protect wdAllowOnlyReading, True, "Password"
        End With
    End With
End Sub
Its just a macro that unprotect the document, next i use macro Paul told me to use to hide the text, and finally reprotect the document.

This macro can hide any kind of text you might need, not only macro buttons so i hope someone else find i usefull, all you need to do its change the style of the text you want to hide, in my case i create a new one that i call "TEST1" but you can name it as you wish.


Thanks alot Paul, you saved me.

Last edited by Eduardo Care; 11-09-2015 at 06:48 PM.
Reply With Quote