Skip to content

Instantly share code, notes, and snippets.

View OlegBezverhii's full-sized avatar
👔
Working

Oleg Bezverhii OlegBezverhii

👔
Working
View GitHub Profile
@OlegBezverhii
OlegBezverhii / macros.vbs
Created September 28, 2020 11:38
Регулярные выражения для Excel для приведение типа томов архива Транснефть к нормальному виду
Public Function RegExpExtract(Text As String, Optional Item As Integer = 1) As String
On Error GoTo ErrHandl
Set regex = CreateObject("VBScript.RegExp")
regex.Pattern = "Г\.0\.0000\.0002-И-ЦУП ВСТО\/ГТП-27\.\d\d\d\-.{1,4}"
regex.Global = True
If regex.Test(Text) Then
Set matches = regex.Execute(Text)
RegExpExtract = matches.Item(Item - 1)
Exit Function
End If
@OlegBezverhii
OlegBezverhii / galactic.vbs
Last active September 28, 2020 11:43
Приведение табличек из Галактики к нормальному виду в Worde
* https://kakvworde.ru/udalenie-razryva-stranicy-v-worde *
Sub Sample()
Dim t As Table
For Each t In ActiveDocument.Tables
t.Columns(1).Width =105
t.Columns(2).Width=170
Next
End Sub