Simpatie.ro - matrimoniale
Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Nou pe simpatie:
Kalifa
Femeie
24 ani
Ialomita
cauta Barbat
24 - 65 ani
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides /

[WORD] Insert Page Margin Using InputBox [VBA]

Pagini: 1 Moderat de TRaP, TonyTzu
#1
Mrrrr
AdMiN
Postari: 2388

Sub SetPageMargins()

Dim Lmarg, Rmarg, Tmarg, Bmarg As String
Lmarg = InputBox("Enter the number of cm for LEFT margin. Note: for decimals use comma (,)")
Rmarg = InputBox("Enter the number of cm for RIGHT margin. Note: for decimals use comma (,)")
Tmarg = InputBox("Enter the number of cm for TOP margin. Note: for decimals use comma (,)")
Bmarg = InputBox("Enter the number of cm for BOTTOM margin. Note: for decimals use comma (,)")

    With ActiveDocument.PageSetup
        .TopMargin = CentimetersToPoints(Tmarg)
        .BottomMargin = CentimetersToPoints(Bmarg)
        .LeftMargin = CentimetersToPoints(Lmarg)
        .RightMargin = CentimetersToPoints(Rmarg)
    End With
End Sub


_______________________________________


 
   
Pagini: 1  
Mergi la