A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Formatting Long Documents
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Managing and printing activeX buttons



 
 
Thread Tools Display Modes
  #1  
Old June 21st, 2004, 02:47 AM
Leanne
external usenet poster
 
Posts: n/a
Default 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  
Old June 21st, 2004, 03:02 AM
Leanne
external usenet poster
 
Posts: n/a
Default 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  
Old June 21st, 2004, 03:40 AM
Jay Freedman
external usenet poster
 
Posts: n/a
Default 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  
Old June 21st, 2004, 03:57 AM
Leanne
external usenet poster
 
Posts: n/a
Default 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  
Old June 21st, 2004, 04:19 AM
Leanne
external usenet poster
 
Posts: n/a
Default 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  
Old June 21st, 2004, 05:27 PM
Jay Freedman
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:36 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.