View Single Post
 
Old 09-15-2016, 05:36 AM
youseeme youseeme is offline Windows 10 Office 2013
Novice
 
Join Date: Sep 2016
Posts: 6
youseeme is on a distinguished road
Default

Thanks again, I think as its just text it might be better to use textboxes.

I have managed to get a textbox added into the header and put in some 'test' text, how do I set the textbox to have no outline and set the font etc for the text?
Code:
    With Selection.Sections(1)
        Set Shp = .Headers(wdHeaderFooterFirstPage).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, _
        Left:=50, Top:=50, Width:=100, Height:=100)
        With Shp
            .LockAspectRatio = True
            .Height = CentimetersToPoints(3.53)
            .Width = CentimetersToPoints(4.68)
            .Left = CentimetersToPoints(8.74)
            .Top = CentimetersToPoints(-0.96)
            .WrapFormat.Side = wdWrapNone
            .WrapFormat.Type = wdWrapBehind
            .Name = "CCTextBox"
            .TextFrame.TextRange.Text = "Test"
        End With
    End With
and last thing, how would I go about hiding it for printing, I was using this to hide the logo..
Code:
           ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Shapes("CCLogo").Visible = msoTrue
Reply With Quote