Показать сообщение отдельно
  #2  
Старый 03.04.2008, 18:00
SESL SESL вне форума
Прохожий
 
Регистрация: 13.03.2008
Сообщения: 5
Репутация: 10
По умолчанию

Если кому интересно, задачу удалось решить с помощью VB макроса, довольно простого вида:
Sub Макрос3()
'
' Макрос3 Макрос
' Макрос записан 27.03.2008 it
'
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
Selection.Find.Text = "@"
j = 0
While Selection.Find.Execute = True
Selection.MoveRight Unit:=wdCharacter, Count:=1
i = 0
While Selection.Text <> "@"
Selection.MoveRight Unit:=wdCharacter, Count:=1
i = i + 1
Wend
Selection.MoveLeft Unit:=wdCharacter, Count:=i, Extend:=wdExtend
Selection.MoveRight Unit:=wdCharacter, Count:=1
Selection.MoveLeft Unit:=wdCharacter, Count:=i, Extend:=wdExtend
j = j + 1
Selection.Copy
Selection.MoveRight Unit:=wdCharacter, Count:=1
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
ChangeFileOpenDirectory "E:\Delphi\z-преобразованиев\HTML\"
ActiveDocument.SaveAs FileName:=Str(j) + ".mht", FileFormat:=wdFormatWebArchive, _
LockComments:=False, Password:="", AddToRecentFiles:=True, WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False, SaveAsAOCELetter:= _
False
ActiveWindow.View.Type = wdWebView
ActiveWindow.Close
Wend
End Sub
Ответить с цитированием