If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Managing and printing activeX buttons
Hi,
I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L |
#2
|
|||
|
|||
Managing and printing activeX buttons
I am using Word 97
-----Original Message----- Hi, I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L . |
#3
|
|||
|
|||
Managing and printing activeX buttons
Hi Leanne
First, create a new style (in the Format Style dialog, click New) and name it ReturnButton. It can have the same formatting as an existing style (such as Hyperlink style), or you can make it look like whatever you want for your buttons.Then apply that style to each button/hyperlink. You need two macros, one to intercept the File Print menu item and one to intercept the Print button on the toolbar (see http://word.mvps.org/FAQs/MacrosVBA/...tSavePrint.htm for an explanation of intercepting Word's commands with properly named macros). Each macro changes the color of the ReturnButton style to white, carries out the original action of the command (show the Print dialog or just print), and then undoes the color change. Instructions for putting the macros in place are at http://www.gmayor.com/installing_macro.htm. Here are the macros: Public Sub FilePrint() ActiveDocument.Styles("ReturnButton").Font.ColorIn dex = wdWhite Dialogs(wdDialogFilePrint).Show ActiveDocument.Undo End Sub Public Sub FilePrintDefault() With ActiveDocument .Styles("ReturnButton").Font.ColorIndex = wdWhite .PrintOut Background:=False .Undo End With End Sub "Leanne" wrote: I am using Word 97 -----Original Message----- Hi, I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L . -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://www.mvps.org/word |
#4
|
|||
|
|||
Managing and printing activeX buttons
Thanks heaps Jay!!!! clear as mud
I'll print that out and give it a go!! -----Original Message----- Hi Leanne First, create a new style (in the Format Style dialog, click New) and name it ReturnButton. It can have the same formatting as an existing style (such as Hyperlink style), or you can make it look like whatever you want for your buttons.Then apply that style to each button/hyperlink. You need two macros, one to intercept the File Print menu item and one to intercept the Print button on the toolbar (see http://word.mvps.org/FAQs/MacrosVBA/...tSavePrint.htm for an explanation of intercepting Word's commands with properly named macros). Each macro changes the color of the ReturnButton style to white, carries out the original action of the command (show the Print dialog or just print), and then undoes the color change. Instructions for putting the macros in place are at http://www.gmayor.com/installing_macro.htm. Here are the macros: Public Sub FilePrint() ActiveDocument.Styles("ReturnButton").Font.ColorIn dex = wdWhite Dialogs(wdDialogFilePrint).Show ActiveDocument.Undo End Sub Public Sub FilePrintDefault() With ActiveDocument .Styles("ReturnButton").Font.ColorIndex = wdWhite .PrintOut Background:=False .Undo End With End Sub "Leanne" wrote: I am using Word 97 -----Original Message----- Hi, I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L . -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://www.mvps.org/word . |
#5
|
|||
|
|||
Managing and printing activeX buttons
Actually, it wasn't as hard as it looked, but it didn't
work, the button still printed -----Original Message----- Hi Leanne First, create a new style (in the Format Style dialog, click New) and name it ReturnButton. It can have the same formatting as an existing style (such as Hyperlink style), or you can make it look like whatever you want for your buttons.Then apply that style to each button/hyperlink. You need two macros, one to intercept the File Print menu item and one to intercept the Print button on the toolbar (see http://word.mvps.org/FAQs/MacrosVBA/...tSavePrint.htm for an explanation of intercepting Word's commands with properly named macros). Each macro changes the color of the ReturnButton style to white, carries out the original action of the command (show the Print dialog or just print), and then undoes the color change. Instructions for putting the macros in place are at http://www.gmayor.com/installing_macro.htm. Here are the macros: Public Sub FilePrint() ActiveDocument.Styles("ReturnButton").Font.ColorIn dex = wdWhite Dialogs(wdDialogFilePrint).Show ActiveDocument.Undo End Sub Public Sub FilePrintDefault() With ActiveDocument .Styles("ReturnButton").Font.ColorIndex = wdWhite .PrintOut Background:=False .Undo End With End Sub "Leanne" wrote: I am using Word 97 -----Original Message----- Hi, I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L . -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://www.mvps.org/word . |
#6
|
|||
|
|||
Managing and printing activeX buttons
Hi Leanne
I assumed -- mistakenly, it seems -- that the button you mentioned was some text made to look like a button, possibly a MacroButton field. If you're using an actual command button from the Control Toolbox, you need some different code. See http://word.mvps.org/FAQs/TblsFldsFm...rintButton.htm for that. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Leanne wrote: Actually, it wasn't as hard as it looked, but it didn't work, the button still printed -----Original Message----- Hi Leanne First, create a new style (in the Format Style dialog, click New) and name it ReturnButton. It can have the same formatting as an existing style (such as Hyperlink style), or you can make it look like whatever you want for your buttons.Then apply that style to each button/hyperlink. You need two macros, one to intercept the File Print menu item and one to intercept the Print button on the toolbar (see http://word.mvps.org/FAQs/MacrosVBA/...tSavePrint.htm for an explanation of intercepting Word's commands with properly named macros). Each macro changes the color of the ReturnButton style to white, carries out the original action of the command (show the Print dialog or just print), and then undoes the color change. Instructions for putting the macros in place are at http://www.gmayor.com/installing_macro.htm. Here are the macros: Public Sub FilePrint() ActiveDocument.Styles("ReturnButton").Font.ColorIn dex = wdWhite Dialogs(wdDialogFilePrint).Show ActiveDocument.Undo End Sub Public Sub FilePrintDefault() With ActiveDocument .Styles("ReturnButton").Font.ColorIndex = wdWhite .PrintOut Background:=False .Undo End With End Sub "Leanne" wrote: I am using Word 97 -----Original Message----- Hi, I'm writing a summary document in which I have included a table of contents and created hyperlinks to the bookmarked ToC entries and would like to add a button the the end of each page of the document to return the reader to the ToC. I've added a button and hyperlink and all is fine but I don't want the button to be visible in the printed version of the document as it isn't needed in that format. I'm hopeless at VB but assume that if it is possible to hide the button for printing,I'll need to write some kind of VB code. Can someone please help? Thanks in advance. L . -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://www.mvps.org/word . |
Thread Tools | |
Display Modes | |
|
|