команда для создания нескольких разных файлов за раз, с возможностью инлайн-переименования в процессе создания (в моем случае это офисные файлы)
Office Document...
Код:
Option Explicit
Function OnClick(ByRef ClickData)
Dim dlg, ext, i
ext = Array("mdb", "xls", "ppt", "pub", "doc")
Set dlg = ClickData.Func.Dlg
dlg.title = "Create Office Document"
dlg.message = "Check document(s) to create:"
dlg.buttons = "OK|Cancel"
dlg.choices = DOpus.NewVector("Access Document", "Excel Document", "PowerPoint Document", "Publisher Document", "Word Document")
dlg.list = DOpus.NewVector
dlg.Show
If dlg.result = 1 Then
For i = 0 To dlg.choices.size - 1
If dlg.list(i) Then
ClickData.Func.Command.RunCommand("Filetype New=." & ext(i) & " NEWNAME=""New " & dlg.choices(i) & """")
End If
Next
End If
End Function
Office Document...
![](http://i68.fastpic.ru/big/2014/1225/66/3b63d29cc38272a9b4962a98d3844166.png)
Код:
Option Explicit
Function OnClick(ByRef ClickData)
Dim dlg, ext, i
ext = Array("mdb", "xls", "ppt", "pub", "doc")
Set dlg = ClickData.Func.Dlg
dlg.title = "Create Office Document"
dlg.message = "Check document(s) to create:"
dlg.buttons = "OK|Cancel"
dlg.choices = DOpus.NewVector("Access Document", "Excel Document", "PowerPoint Document", "Publisher Document", "Word Document")
dlg.list = DOpus.NewVector
dlg.Show
If dlg.result = 1 Then
For i = 0 To dlg.choices.size - 1
If dlg.list(i) Then
ClickData.Func.Command.RunCommand("Filetype New=." & ext(i) & " NEWNAME=""New " & dlg.choices(i) & """")
End If
Next
End If
End Function