Hide word docs in excel

DeepUnderground
07-26-2010, 06:42 PM
I have the following code:

Sub ClearEntireVerticalDistributionTable_FormattingOFF(ByVal mysheet As Worksheet)
Dim doc As Word.Document

Set doc = mysheet.OLEObjects(2).Object

mysheet.Range(Cell_2000).MergeArea.ClearContents
mysheet.Range(Cell_2000).MergeArea.Locked = True

With mysheet.Range("$B$14:$Y$123")
.ClearContents
.Interior.ColorIndex = xlNone
.Borders.LineStyle = xlNone
.Locked = True
End With

doc.Visible = False '<<<<<<<<<<<<<<<<< this gives an error
mysheet.PageSetup.PrintArea = "$B$2:$Y$62"

End Sub



doc.Visible = False gives an error. Does anyone know of a good way to hide word docs in excel. It doesn't work quite like a text box..

DeepUnderground
07-28-2010, 01:11 PM
ActiveSheet.OLEObjects(2).ShapeRange.PictureFormat.Brightness = 1#
ActiveSheet.OLEObjects(2).ShapeRange.PictureFormat.Contrast = 1#

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum