Ukazi, ki sem jih pogrešal v Ms Wordu - zato sem jih napisal sam
download
Makro, ki zažene kalkulator
Orodja > Makro > Makri...
Ime makra: Kalkulator
Ustvari
Sub Kalkulator()
x = Shell("c:\windows\calc.exe", 6)
End Sub
Makro, ki vrže
trenutno odprti dokument v koš
Orodja > Makro > Makri...
Ime makra: Brisi
Ustvari
Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String
End Type
Private Declare Function SHFileOperation Lib "shell32.dll" (lpFileOp As SHFILEOPSTRUCT) As Long
Sub Brisi()
Dim s As String
On Error GoTo 10
'če dokument še ni shranjen ga zapri
If ActiveDocument.Path = "" Then
ActiveDocument.Close savechanges:=wdNotSaveChanges
Else
s = ActiveDocument.Path + "\" + ActiveDocument.Name
'zapri dokument (ne shranjuj sprememb)
ActiveDocument.Close savechanges:=wdNotSaveChanges
'Vrzi v koš
Dim sfoPacket As SHFILEOPSTRUCT
sfoPacket.wFunc = &H3 'FO_DELETE
sfoPacket.pFrom = s
sfoPacket.fFlags = &H40 'FOF_ALLOWUNDO
RecycleBin = SHFileOperation(sfoPacket)
End If
10:
End Sub
Makra, ki služita za premikanje naprej in nazaj med večimi odprtimi okni
Orodja > Makro > Makri...
Ime makra: NextWindow
Ustvari
Sub NextWindow()
Dim i, n As Integer
n = Application.Windows.count 'število vseh odprtih oken v dokumentu
i = ActiveWindow.Index 'številka trenutno aktivnega dokumenta
i = i + 1
If i > n Then i = 1
Windows(i).Activate
End Sub
Sub BackWindow()
Dim i, n As Integer
n = Application.Windows.count 'število vseh odprtih oken v dokumentu
i = ActiveWindow.Index 'številka trenutno aktivnega dokumenta
i = i - 1
If i < 1 Then i = n
Windows(i).Activate
End Sub
Makro, ki prikaže obliko vseh pisav/fontov v računalniku
Orodja > Makro > Makri...
Ime makra: FontView
Ustvari
Sub FontView()
Dim vzorec As String
Dim i, response As Integer
Dim afont
vzorec = "VELIKA PISAVA _ mala pisava _ ŠšĐđČčĆ掞 _ 0123456789 _ (!@#,.$%^?) +-*= ;:,." + vbCrLf
Selection.font.Size = 12
For Each afont In FontNames
With Selection
.font.Name = "Arial"
.TypeText Text:=vbCrLf + afont + ":" + vbCrLf
.font.Name = afont
.font.Size = 8
.TypeText Text:=vzorec
End With
If response = vbCancel Then Exit For
Next afont
End Sub
|