- Код: Выделить всё
Option Explicit
Private Sub Command1_Click()
MakeDesired "c:\ïðîâåðêà.doc", "c:\íîâàÿ ïàïêà\"
End Sub
Private Sub MakeDesired(FileName As String, SaveFolder As String)
Dim w As Object, wd As Object, t As Object, i As Long
Set w = CreateObject("word.application")
'w.Visible = True
Set wd = w.documents.open(FileName)
For Each t In wd.tables
t.converttotext vbTab
Next
For Each t In wd.shapes
t.Select
w.selection.copyaspicture
StdFunctions.SavePicture Clipboard.GetData, SaveFolder & t.Name & ".bmp"
Next
For i = 1 To wd.inlineshapes.Count
wd.inlineshapes(i).Select
w.selection.copyaspicture
StdFunctions.SavePicture Clipboard.GetData, SaveFolder & CStr(i) & ".bmp"
Next
Clipboard.Clear
wd.saveas SaveFolder & wd.Name & ".txt", 2 'wdformattext
wd.Close
w.quit
Set w = Nothing
End Sub