Files
Gostomizer/MacrosList.bas
zbronik 129d1b6639 обновление файлов Ribbon XML Editorm, сохранение
отдельных файлов макросов, добавление результирующего файла гостомизатора
2025-05-13 23:35:35 +03:00

91 lines
3.0 KiB
QBasic

Attribute VB_Name = "MacrosList"
Sub ML_AddListA4()
'for debug
'MsgBox "Çàïóñê ôóíêöèè âñòàâêè ëèñòà À4"
MsgBox "äî Selection.PageSetup.Orientation = " & Selection.PageSetup.Orientation
Selection.InsertBreak Type:=wdSectionBreakNextPage
With Selection.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2)
.BottomMargin = CentimetersToPoints(2)
.LeftMargin = CentimetersToPoints(3)
.RightMargin = CentimetersToPoints(1.5)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.25)
.FooterDistance = CentimetersToPoints(1.25)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(42)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
MsgBox "ïîñëå Selection.PageSetup.Orientation = " & Selection.PageSetup.Orientation
If Selection.PageSetup.Orientation = wdOrientPortrait Then
MsgBox "Ïîðòðåòíàÿ"
Selection.PageSetup.Orientation = wdOrientLandscape
Else
MsgBox "Àëüáîìíàÿ"
Selection.PageSetup.Orientation = wdOrientPortrait
End If
End Sub
Sub ML_AddListA3()
'for debug
MsgBox "Çàïóñê ôóíêöèè âñòàâêè ëèñòà À3"
Dim ps As PageSetup
Set ps = Selection.PageSetup
Selection.InsertBreak Type:=wdSectionBreakNextPage
With Selection.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientLandscape
.TopMargin = CentimetersToPoints(1.5)
.BottomMargin = CentimetersToPoints(3)
.LeftMargin = CentimetersToPoints(2)
.RightMargin = CentimetersToPoints(2)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.25)
.FooterDistance = CentimetersToPoints(1.25)
.PageWidth = CentimetersToPoints(29.7)
.PageHeight = CentimetersToPoints(21)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
Selection.InsertBreak Type:=wdSectionBreakNextPage
Selection.PageSetup = ps
End Sub