HBN Infotech

Training – Service – Consultancy

Easy Macro to create page border in 2 seconds – Microsoft Word Tutorial

Like Our Page For Latest Tutorial Updates

Subscribe Us On YouTube

Easy Macro to create page border in 2 seconds – Microsoft Word Tutorial – Microsoft Word Macro Examples – Microsoft Word Page Border Download

Microsoft Word Page Border Download

Using this Macro code snippet below you can create Page Borders with Auto Shapes, Word Art, Clip Arts and even pictures. But there is a slight change in the procedure for each of them. So watch the complete video. I guess this would be a great Microsoft Word Macro Examples for those who want to learn the VBA for Microsoft Word.

Creative Commons License
This work is licensed under a Creative Commons

Click here to download the Microsoft Word Page Border Sample 1

Click here to download the Microsoft Word Page Border Sample 2

Preview:

Microsoft Word Page Border Download

Microsoft Word Macro (VBA) Code used in this tutorial:

Sub CreatePageBorder()
‘Disclaimer: This code is only for Educational and Scientific purposes only. By using this code you agree that the author cannot be held responsible for any kind of damages by the usage of this code.
Application.ScreenRefresh
Application.ScreenUpdating = False
ActiveDocument.Shapes.SelectAll
Selection.ShapeRange.Height = 27.35
Selection.ShapeRange.Width = 27.35
Selection.ShapeRange.Top = 0
Selection.ShapeRange.Left = 0
Set abc = Selection.ShapeRange
For abc = 1 To 20
Selection.ShapeRange.Duplicate.Select
Selection.ShapeRange.IncrementLeft 15.35
Selection.ShapeRange.IncrementTop -12#
Next abc
For abc = 1 To 27
Selection.ShapeRange.Duplicate.Select
Selection.ShapeRange.IncrementLeft -12#
Selection.ShapeRange.IncrementTop 15.35
Next abc
For abc = 1 To 20
Selection.ShapeRange.Duplicate.Select
Selection.ShapeRange.IncrementLeft -39.35
Selection.ShapeRange.IncrementTop -12#
Next abc
For abc = 1 To 27
Selection.ShapeRange.Duplicate.Select
Selection.ShapeRange.IncrementLeft -12#
Selection.ShapeRange.IncrementTop -39.35
Next abc
ActiveDocument.Shapes.SelectAll
Selection.ShapeRange.Group.Select
WordBasic.AlignCenterHorizontal
WordBasic.AlignCenterVertical
Application.ScreenUpdating = True
End Sub

himaghiri

Founder at HBN Infotech
Himaghiri Thanayan.N is the founder of HBN Infotech. He has great dreams and passion for Graphic Design, Web Design, CAD Design, Arts & Crafts, Science & Information Technology and Article Writing.

Subscribe Us On YouTube

Like Our Page For Latest Tutorial Updates

Leave a Reply

Your email address will not be published. Required fields are marked *

three × 3 =

HBN Infotech © 2016 Frontier Theme