Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2004, 11:01 AM
Authorized User
 
Join Date: Oct 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hiding Buttons During Printing in Word2000

Sorry, this is about Word, but I didn't find a Word VBA forum. I guess it's not popular to use VBA in Word. Anyway, I need to be able to have buttons in my Word form template that do not print. I need the form to look like an existing hardcopy version, so these buttons cannot be showing on the printed document. It looks like the only way to accomplish this is through VBA, but I don't see any way in VBA to do this. The "Visible" attribute that you see in Excell does not exist in Word, and that really throws a wrench in my plans. Thanks for any help here.

 
Old October 22nd, 2004, 01:34 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe you can use this solution:

http://word.mvps.org/FAQs/TblsFldsFm...rintButton.htm
 
Old October 22nd, 2004, 01:38 PM
Authorized User
 
Join Date: Oct 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Tried that. It causes errors, and doesn't work. Maybe I need to modify it, but I don't know how to.

 
Old October 22nd, 2004, 01:52 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Are you sure you're using a textbox from the drawing tools? Not from the ordinary controlelements!

I tried this (in wd2003), though it first prints the page as you intend but also prints a page with all controls visible. Also, asked me to save it as mdi. Don't know why, Word's not my strong side ;))
----
With ActiveDocument
    .Shapes(1).Visible = msoFalse
    .PrintOut Background:=False
    .Shapes(1).Visible = msoTrue
End With
    ActivePrinter = "Kyocera FS-3500 / FS-3500A"
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
        wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
        ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
        False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
---





Similar Threads
Thread Thread Starter Forum Replies Last Post
Hiding Footer Arsi CSS Cascading Style Sheets 2 April 13th, 2007 06:55 PM
hiding footer. rupen Javascript How-To 4 April 12th, 2007 06:07 PM
Hiding scrollbars. rupen HTML Code Clinic 1 September 5th, 2005 07:00 AM
capturing printing settings when printing reports nikolaosk Access VBA 0 February 8th, 2005 04:14 AM
hiding in we config vohra_vikas ADO.NET 2 September 28th, 2004 08:36 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.