Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2005

Tip: Looking for answers? Try searching our database.

How to make VB Textbox invisible

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Locke Nash Cole - 06 Aug 2005 16:57 GMT
I'm trying to capture the print event and make a VB Textbox on a word
document invisible while printing, however vb macros does not allow .visible
= false on the text boxes inside of word, anyone know how to do this?

-L
Cindy M  -WordMVP- - 12 Aug 2005 09:16 GMT
Hi Locke,

> I'm trying to capture the print event and make a VB Textbox on a word
> document invisible while printing, however vb macros does not allow .visible
> = false on the text boxes inside of word, anyone know how to do this?

What kind of "text box"? There are three or four different possibilities in
word. Which commmand did you use to create it?

And which version of Word are we talking about?

I get the feeling you're talking about an ActiveX control, from the Controls
Toolbox. If that's the case, have you also protected the document as a form?
And is the control in-line with the text, or formatted with textflow
formatting?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Allan - 13 Aug 2005 03:02 GMT
What is the reason for using the textbox? Does it have buttons in it?
If so you would be better off to place the buttons into table cells an
then make the table row hidden. Place a bookmark into the cell
containing the buttons, loop through the document using something lik
the following:

If ActiveDocument.Bookmarks.Exists("bkButtonPrint") = True Then
ActiveDocument.Bookmarks("bkButtonPrint").Select
'select cell
If Selection.Information(wdWithInTable) Then
Set myrange = Selection.Cells(1).Range
With Selection.Font
.Hidden = True
End With
End If
End If

Once printed, you can turn the buttons back on again

--
Alla
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.