P
Patrike
Hi : )
I am build some kinda of reports and I have some information I would like to
let the user show if he/she want to see or not. If he/she want to see, he/she
will click in image component. But I would like to use the 'same' (visually
talkin) component to hide the data. This is a sample:
Private Sub Image1_Click()
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces_lista"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Tables(1).Select
With Selection.Tables(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleDashSmallGap
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = 14540253
End With
Selection.Tables(1).Rows.Height = CentimetersToPoints(0.6)
Selection.Font.Color = wdColorGray80
Selection.Font.Size = 8
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces"
End Sub
So, when I click in the icon, a table shows up with some data, and to 'hide'
it, I use:
Sub interfaces_compact()
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces_lista"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Tables(1).Select
With Selection.Tables(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = wdColorWhite
End With
Selection.Tables(1).Rows.Height = CentimetersToPoints(0#)
Selection.Font.Color = wdColorWhite
Selection.Font.Size = 1
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces"
End Sub
So, there is some way to use the control to show up the table (code 1), and
if the table is show and I click in the control again it hides (code 2)?
I tried to hide the component... but I didn´t get sucess.
Thanks for any info.
I am build some kinda of reports and I have some information I would like to
let the user show if he/she want to see or not. If he/she want to see, he/she
will click in image component. But I would like to use the 'same' (visually
talkin) component to hide the data. This is a sample:
Private Sub Image1_Click()
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces_lista"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Tables(1).Select
With Selection.Tables(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleDashSmallGap
.LineWidth = wdLineWidth050pt
.Color = 14540253
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleDashSmallGap
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = 14540253
End With
Selection.Tables(1).Rows.Height = CentimetersToPoints(0.6)
Selection.Font.Color = wdColorGray80
Selection.Font.Size = 8
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces"
End Sub
So, when I click in the icon, a table shows up with some data, and to 'hide'
it, I use:
Sub interfaces_compact()
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces_lista"
Selection.Find.ClearFormatting
With Selection.Find
.Text = ""
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Tables(1).Select
With Selection.Tables(1)
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderHorizontal)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
With .Borders(wdBorderVertical)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorWhite
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = wdColorWhite
End With
Selection.Tables(1).Rows.Height = CentimetersToPoints(0#)
Selection.Font.Color = wdColorWhite
Selection.Font.Size = 1
Selection.GoTo What:=wdGoToBookmark, Name:="interfaces"
End Sub
So, there is some way to use the control to show up the table (code 1), and
if the table is show and I click in the control again it hides (code 2)?
I tried to hide the component... but I didn´t get sucess.
Thanks for any info.