ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Position Wordart in Page Center (https://www.excelbanter.com/excel-programming/326650-position-wordart-page-center.html)

[email protected]

Position Wordart in Page Center
 
This userform dumps blue wordart onto a apge. It require the left and
right variables. I want the text to be positioned in the center. I
tried ".Pageheight/2" and similar variations but i can;t figure it out.
Any ideas how to make the left and top values variable based on project
size?

--------------------------------------------------------
Private Sub CommandButton1_Click()

Dim shpWordArt As Shape

Set shpWordArt = ActiveDocument.Pages(1).Shapes.AddTextEffect _
(PresetTextEffect:=msoTextEffect7, Text:=TextBox1.Value, _
FontName:="Nino Salvaggio Sign", FontSize:=125, _
FontBold:=msoFalse, FontItalic:=msoFalse, _
Left:=144, Top:=72)

shpWordArt.Fill.ForeColor.RGB = RGB(Red:=0, Green:=0, blue:=255)

TextBox1.Value = ""
TextBox1.SetFocus
Unload bluetext

End Sub



All times are GMT +1. The time now is 04:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com