Добавлен модуль с макросами
This commit is contained in:
128
modules.vbs
Normal file
128
modules.vbs
Normal file
@@ -0,0 +1,128 @@
|
|||||||
|
Option Explicit 'Потребовать явного объявления всех переменных в файле
|
||||||
|
|
||||||
|
'TableFormatter (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub TableFormatter(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'PicFormatter (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub PicFormatter(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'AddListA4 (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddListA3(control As IRibbonControl)
|
||||||
|
'for debug
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
'AddListA3 (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddListA4(control As IRibbonControl)
|
||||||
|
'for debug
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
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
|
||||||
|
If Selection.PageSetup.Orientation = wdOrientPortrait Then
|
||||||
|
Selection.PageSetup.Orientation = wdOrientLandscape
|
||||||
|
Else
|
||||||
|
Selection.PageSetup.Orientation = wdOrientPortrait
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampForm5 (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddStampForm5(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampForm6 (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddStampForm6(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampFrame (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddFrame(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampLeftUp (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddStampLeftUp(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampLeftDown (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddStampLeftDown(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampLeftMiddle (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddStampLefMid(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'StampPageNumber (элемент: button, атрибут: onAction), 2010+
|
||||||
|
Private Sub AddPageNumber(control As IRibbonControl)
|
||||||
|
MsgBox "Сработала процедура, заданная в onAction элемента " & control.ID
|
||||||
|
End Sub
|
||||||
|
|
||||||
Reference in New Issue
Block a user