Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding Text Boxes to New Page
Hello,
I am trying to create a page where there are 3 text boxes. If another page is needed I need for a new page to be created with the same 3 text boxes and if another page is needed etc. Here is the code I have.....but it is putting the 3 new text boxes on page 1 and creates a new blank page. What am I doing wrong? Sub Macro2() ' ' Macro2 Macro ' Macro recorded 12/23/2009 by Marsha ' ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 72#, _ 36#, 486#, 18#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 18# Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(0.5) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 63#, _ 63#, 495#, 459#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 468# Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(0.88) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 54#, _ 540#, 504#, 189#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 189.35 Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(7.5) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveWindow.ActivePane.LargeScroll Down:=-1 ActiveDocument.Sections.Add End Sub |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding Text Boxes to New Page
See response to your identical post in the vba.general newsgroup.
Please do not post the same question separately to multiple newsgroups. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "MRupel" wrote in message ... Hello, I am trying to create a page where there are 3 text boxes. If another page is needed I need for a new page to be created with the same 3 text boxes and if another page is needed etc. Here is the code I have.....but it is putting the 3 new text boxes on page 1 and creates a new blank page. What am I doing wrong? Sub Macro2() ' ' Macro2 Macro ' Macro recorded 12/23/2009 by Marsha ' ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 72#, _ 36#, 486#, 18#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 18# Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(0.5) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 63#, _ 63#, 495#, 459#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 468# Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(0.88) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveDocument.Shapes.AddTextbox(msoTextOrientatio nHorizontal, 54#, _ 540#, 504#, 189#).Select Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select Selection.ShapeRange.Fill.Visible = msoFalse Selection.ShapeRange.Fill.Transparency = 0# Selection.ShapeRange.Line.Weight = 0.25 Selection.ShapeRange.Line.DashStyle = msoLineSolid Selection.ShapeRange.Line.Style = msoLineSingle Selection.ShapeRange.Line.Transparency = 0# Selection.ShapeRange.Line.Visible = msoTrue Selection.ShapeRange.Line.ForeColor.RGB = RGB(192, 192, 192) Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255) Selection.ShapeRange.LockAspectRatio = msoFalse Selection.ShapeRange.Height = 189.35 Selection.ShapeRange.Width = 486# Selection.ShapeRange.TextFrame.MarginLeft = 7.2 Selection.ShapeRange.TextFrame.MarginRight = 7.2 Selection.ShapeRange.TextFrame.MarginTop = 3.6 Selection.ShapeRange.TextFrame.MarginBottom = 3.6 Selection.ShapeRange.RelativeHorizontalPosition = _ wdRelativeHorizontalPositionColumn Selection.ShapeRange.RelativeVerticalPosition = _ wdRelativeVerticalPositionPage Selection.ShapeRange.Left = wdShapeCenter Selection.ShapeRange.Top = InchesToPoints(7.5) Selection.ShapeRange.LockAnchor = True Selection.ShapeRange.WrapFormat.AllowOverlap = False Selection.ShapeRange.WrapFormat.Side = wdWrapBoth Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0) Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13) Selection.ShapeRange.WrapFormat.Type = 3 Selection.ShapeRange.ZOrder 5 ActiveWindow.ActivePane.LargeScroll Down:=-1 ActiveDocument.Sections.Add End Sub |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding Text Boxes to New Page
Thank you. Sorry. I thought I should post to Programming.
|
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding Text Boxes to New Page
Where is the vba.general newsgroup?
|
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Adding Text Boxes to New Page
Nevermind...I found it.
|
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to stop text boxes moving around page when add other boxes or | Microsoft Word Help | |||
2003 text boxes on web page | Microsoft Word Help | |||
How can I create four equal boxes of text on one page? | Page Layout | |||
Adding text as a page border? | Microsoft Word Help | |||
Text boxes and saving as a web page | Page Layout |