A'Koerdays Blog

31 Mei 2013

Memberi Garis tepi Akta di Ms.Word

Filed under: Tak Berkategori — akoerday @ 7:20 am

Caranya sebagai berikut.
• Buka dokumen baru pada Ms. Word 2007, lalu klik tab View > Macros > View Macros.
• Klik nama macro tersebut lalu klik Create.
• Salin kode dibawah ini ke kotak yang disediakan.
Code :
Sub membuatgaristepi()

‘ membuatgaristepi Macro


Dim d1, d2, xt As Long
Dim h, i, jb As Integer
Dim DP As Object
Set DP = ActiveDocument.BuiltInDocumentProperties
jb = DP(“Number of Lines”)
Selection.HomeKey Unit:=wdStory
For h = 1 To jb
Selection.EndKey
Selection.Start = Selection.End – 1
If Selection.Text = “#” Then
Selection.Delete
Selection.MoveStart Unit:=wdCharacter, Count:=1
GoTo lewat
ElseIf Selection.Text = “@” Then
Selection.MoveEnd Unit:=wdCharacter, Count:=1
Selection.Delete
GoTo Usai
End If
Selection.Collapse Direction:=wdCollapseEnd
If Selection.Paragraphs.Alignment = wdAlignParagraphCenter Then
Selection.HomeKey xt = Selection.Information(wdHorizontalPositionRelativeToTextBoundary)
Selection.Paragraphs.Alignment = wdAlignParagraphLeft
For i = 1 To 200
Selection.InsertAfter “-”
Selection.Collapse Direction:=wdCollapseEnd
d1 = Selection.Information(wdHorizontalPositionRelativeToTextBoundary)
If d1 >= xt Then Exit For
Next i
End If
Selection.EndKey
d1 = Selection.Information(wdHorizontalPositionRelativeToTextBoundary)
d2 = d1
For i = 1 To 200
Selection.InsertAfter “-”
Selection.Collapse Direction:=wdCollapseEnd
d1 = Selection.Information(wdHorizontalPositionRelativeToTextBoundary)
If d1 Macros.
• Pilih macro yang tadi dibuat lalu klik Run.
• Tunggu sampai selesai. Lalu, klik OK.

Tinggalkan sebuah Komentar »

Belum ada komentar.

RSS feed for comments on this post. TrackBack URI

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s

Buat situs web atau blog gratis di WordPress.com.

%d blogger menyukai ini: