<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=5195&amp;type=atom" />
	<updated>2010-12-04T09:41:09Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=5195</id>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42462#p42462" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Kobrasol пишет:</cite><blockquote><p>При обработке ошибок сбрасывает переменные.</p></blockquote></div><p>Что сие означает?<br /></p><div class="quotebox"><cite>Kobrasol пишет:</cite><blockquote><p>2. Как удалить временный файл начинающийся с &quot;~$&quot;, не чего кроме как перебора в голову не приходит?</p></blockquote></div><p>Зачем? Он удаляется автоматически при закрытии открытого документа.</p><p>Боюсь, Вы как-то не так понимаете обработку ошибок в VBScript, коллега.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-12-04T09:41:09Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42462#p42462</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42439#p42439" />
			<content type="html"><![CDATA[<p>При обработке ошибок сбрасывает переменные.</p><p>При ошибке:<br />1. Как сделать что бы не сбрасывал переменные?<br />2. Как удалить временный файл начинающийся с &quot;~$&quot;, не чего кроме как перебора в голову не приходит?</p><p>За комментировал обработку ошибок, не могу придумать как реализовать выше написанное.</p><p>Подскажите что делаю не так:<br /></p><div class="codebox"><pre><code>&lt;html id=&quot;appHTML&quot;&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;ru&quot;&gt;
        &lt;title&gt;Конвертер файлов&lt;/title&gt;
        &lt;hta:Application
            Icon = &quot;%ProgramFiles%\Microsoft Office\OFFICE11\WINWORD.EXE&quot;
            Id=&quot;oHTA&quot;
            ApplicationName=&quot;Конвертер файлов&quot;
            Border=&quot;normal&quot;
            BorderStyle=&quot;normal&quot;
            Caption=&quot;yes&quot;
            ContextMenu=&quot;no&quot;
            InnerBorder=&quot;yes&quot;
            MaximizeButton=&quot;no&quot;
            MinimizeButton=&quot;yes&quot;
            Navigable=&quot;no&quot;
            Scroll=&quot;auto&quot;
            ScrollFlat=&quot;no&quot;
            Selection=&quot;no&quot;
            ShowInTaskbar=&quot;yes&quot;
            SingleInstance=&quot;yes&quot;
            SysMenu=&quot;yes&quot;
            Version=&quot;1.0 RC2&quot;
            WindowState=&quot;normal&quot;
        /&gt;
        &lt;object classid=&quot;clsid:0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC&quot; id=&quot;MSScriptControl&quot;&gt;
            &lt;param name=&quot;Timeout&quot; value=&quot;10000&quot;&gt;
            &lt;param name=&quot;AllowUI&quot; value=&quot;-1&quot;&gt;
            &lt;param name=&quot;UseSafeSubset&quot; value=&quot;0&quot;&gt;
        &lt;/object&gt;
    &lt;/head&gt;
    
    &lt;style type=&quot;text/css&quot;&gt;
        BODY {
            font: x-small Verdana, Arial, sans-serif;
            color: WindowText;
            background-color: ButtonFace;
        }
        .Row{
            clear:both;
        }
        .Left{
            float:Left;
            clear:none;
        }
        .Right{
            float:Right;
            clear:none;
        }
        .NonValid { color:FireBrick; }
        #Status { font: xx-small; }
    &lt;/style&gt;
    
    &lt;script language=&quot;vbscript&quot;&gt;
        Option Explicit
        &#039;On Error Resume Next
        
        &#039;===================================================================================================
        Function SelectFolder()
            Const BIF_RETURNONLYFSDIRS = &amp;H0001
            Const BIF_EDITBOX          = &amp;H0010
            Const BIF_VALIDATE         = &amp;H0020
            Const BIF_NEWDIALOGSTYLE   = &amp;H0040
            
            Dim objShell
            Dim objFSO
            
            Dim lngHWND
            Dim intOptions
            Dim strRootFolder
            
            Dim objFolder
            Dim strTemp
            
            Set objFSO    = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            Set objShell  = CreateObject(&quot;Shell.Application&quot;)
            
            lngHWND       = oHTA.Document.GetElementByID(&quot;MSScriptControl&quot;).SitehWnd
            intOptions    = BIF_RETURNONLYFSDIRS Or BIF_NEWDIALOGSTYLE Or BIF_EDITBOX Or BIF_VALIDATE
            strRootFolder = 0
            
            Set objFolder = objShell.BrowseForFolder(lngHWND, &quot;Укажите папку&quot;, intOptions, strRootFolder)
            
            If Not objFolder Is Nothing Then
                If objFSO.FolderExists(objFolder.Self.Path) Then
                    SelectFolder = objFolder.Self.Path
                End If
            End If
            
            Set objFolder = Nothing
            Set objShell  = Nothing
            Set objFSO    = Nothing
        End Function
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectSourceFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                SourceFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectDestFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                DestFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnClick
            If ValidateFields() Then
                With document
                    .getElementByID(&quot;Status&quot;).innerText               = &quot;Идёт обработка…&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled          = True
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled    = True
                    &#039;.getElementByID(&quot;SourceFolderAfter&quot;).disabled     = True
                    
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled            = True
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled      = True
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled          = True
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled = True
                    .getElementByID(&quot;Convert&quot;).disabled               = True
                    .getElementByID(&quot;DestFormat&quot;).disabled            = True
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor           = &quot;wait&quot;
                    
                End With
                
                setTimeout &quot;Convert&quot;, 0
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnBlur()
            With document
                .getElementByID(&quot;Status&quot;).innerText                = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFolder&quot;).className          = &quot;&quot;
                
                .getElementByID(&quot;lblDestFolder&quot;).className         = &quot;&quot;
                .getElementByID(&quot;DestFolder&quot;).className            = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFormat&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFormat&quot;).className          = &quot;&quot;
                
                .getElementByID(&quot;lblDestFormat&quot;).className         = &quot;&quot;
                .getElementByID(&quot;DestFormat&quot;).className            = &quot;&quot;
                
            End With
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        &#039;Sub lblSourceFolderAfter_OnClick()
        &#039;    With document.getElementByID(&quot;SourceFolderAfter&quot;)
        &#039;        .focus
        &#039;        .checked = Not .checked
        &#039;    End With
        &#039;End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub lblDeleteAfterProcessing_OnClick()
            With document.getElementByID(&quot;DeleteAfterProcessing&quot;)
                .focus
                .checked = Not .checked
            End With
        End Sub
        &#039;===================================================================================================
        Function ValidateFields()
            Dim objFSO
            Dim strValidateResult
            
            Dim strSourceFolder
            Dim strDestFolder
            
            Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            
            ValidateFields    = True
            strValidateResult = &quot;&quot;
            
            With document
                strSourceFolder = .getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = .getElementByID(&quot;DestFolder&quot;).value
                
                &#039;If .getElementByID(&quot;SourceFolderAfter&quot;).disabled    = False Then
                &#039;   strDestFolder   = .getElementByID(&quot;SourceFolder&quot;).value
                &#039;end if
                
                If Not objFSO.FolderExists(strSourceFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Исходная папка не найдена. &quot;
                &#039;    .getElementByID(&quot;SourceFolderAfter&quot;).disabled     = True
                    .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;SourceFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                If Not objFSO.FolderExists(strDestFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Целевая папка не найдена.&quot;
                    strDestFolder = .getElementByID(&quot;SourceFolder&quot;).value
                    .getElementByID(&quot;lblDestFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;DestFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                .getElementByID(&quot;Status&quot;).innerText = strValidateResult
            End With
            
            Set objFSO = Nothing
        End Function 
        &#039;===================================================================================================
        
        &#039;===================================================================================================
            Sub Convert()
                &#039;On Error Resume Next 
                &#039;Выражение, которое может вызвать ошибку 
                &#039;If Err &lt;&gt; 0 Then
                &#039;Msgbox &quot;Произошла ошибка. &quot; &amp; Err.Description
                &#039;window.alert(Err.Description)
                &#039;Err.Clear 
                &#039;End if 

                Const wdFormatRTF = 6         &#039;RTF 2003
                Const wdFormatDocument = 0    &#039;DOC 2003 для формата office 97 = &quot;102&quot; без wdFormatDocument
                Const wdFormatText = 2        &#039;TXT обычный текст
                Const wdFormatHTML = 8        &#039;HTM, HTML на всякий случай.
                Const wdFormatWebArchive =9   &#039;MHT, MHTML случай всякий бывает.
                
                Dim objFSO
                Dim objFolder
                Dim objFile
                
                Dim objWord
                
                Dim strSourceFolder
                Dim strDestFolder
                
                Dim strSourceFormat
                Dim strDestFormat
                Dim wdstrDestFormat
                
                Dim boolDeleteAfterProcessing
                &#039;Dim boolSourceFolderAfter
                
                &#039;Dim ConvertSub
                
                Dim StartTime
                
                &#039;ConvertSub = False
                
                StartTime       = Timer
                
                strSourceFolder = document.getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = document.getElementByID(&quot;DestFolder&quot;).value
                
                strSourceFormat = document.getElementByID(&quot;SourceFormat&quot;).value
                strDestFormat = document.getElementByID(&quot;DestFormat&quot;).value
                
                boolDeleteAfterProcessing = document.getElementByID(&quot;DeleteAfterProcessing&quot;).checked
                &#039;boolSourceFolderAfter     = document.getElementByID(&quot;SourceFolderAfter&quot;).checked
                
                &#039;If .getElementByID(&quot;SourceFolderAfter&quot;).disabled    = False Then
                &#039;    strDestFolder   = .getElementByID(&quot;SourceFolder&quot;).value
                &#039;end if
                
                Set objFSO      = CreateObject(&quot;Scripting.FileSystemObject&quot;)
                Set objFolder   = objFSO.GetFolder(strSourceFolder)
                
                Set objWord     = CreateObject(&quot;Word.Application&quot;)
                
                Select Case strDestFormat
                        Case &quot;rtf&quot;
                            wdstrDestFormat = 6
                        Case &quot;doc&quot;
                            wdstrDestFormat = 0
                        Case &quot;txt&quot;
                            wdstrDestFormat = 2
                        Case &quot;htm&quot;
                            wdstrDestFormat = 8
                        Case &quot;html&quot;
                            wdstrDestFormat = 8
                End Select
                
                For Each objFile In objFolder.Files
                    If UCase(objFSO.GetExtensionName(objFile)) = UCase(strSourceFormat) Then
                        With objWord.Documents.Open(objFile.Path)
                            .SaveAs objFSO.BuildPath(strDestFolder, objFSO.GetBaseName(objFile.Name) &amp; &quot;.&quot; &amp; strDestFormat), wdstrDestFormat
                            .Close
                        End With
                        
                        If boolDeleteAfterProcessing Then
                            objFile.Delete
                        End If
                    End If
                Next
                
                objWord.Quit
                
                &#039;ConvertSub = True
                
        &#039;========================================================================================================
        
        &#039;========================================================================================================
                Set objWord   = Nothing
                
                Set objFile   = Nothing
                Set objFSO    = Nothing
                Set objFolder = Nothing
                
                With document
                    .getElementByID(&quot;Status&quot;).innerText = &quot;На обработку затрачено: &quot; &amp; _
                        TimeSerial(0, 0, Timer - StartTime) &amp; &quot;.&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled         = False
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled   = False
                    &#039;.getElementByID(&quot;SourceFolderAfter&quot;).disabled    = False
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled           = False
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled     = False
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled         = False
                    .getElementByID(&quot;DestFormat&quot;).disabled           = False
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled= False
                    .getElementByID(&quot;Convert&quot;).disabled              = False
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor          = &quot;auto&quot;
                End With
            End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
            Sub ConvertError()
        
        &#039;Процедура оброботки ошибок
        &#039;1. Удаление процесса Winword.exe при ошибке
        &#039;2. Удаление временного файла objFile.Path &amp; &quot;~$&quot; &amp; objFile.Name ???
        &#039;3. Создание папки &quot;Bad_File&quot; и перемещение несконвертированого файла в эту папку.
        
        &#039;===================================================================================================
        &#039;1. Удаление процесса Winword.exe при ошибке
        &#039;===================================================================================================
  
                Dim strFolderName
                Dim strFullFolderName
                
                Dim objFSO
                Dim objFolder
                Dim SourceFolder
                Dim strSourceFolder
                Dim objFile
                
                Dim objService
                Dim objProc

                Select Case Err.Number
                        Case 0                            &#039; нет ошибок;
                            msgbox &quot;Конвертирование завершено&quot;
                            
                        Case Else                         &#039; есть ошибки;
                            msgbox &quot;Неизвестная ошибка: &quot; &amp;  Err.Number
                            
                End Select
                
                
                With document
                    .getElementByID(&quot;Status&quot;).innerText = &quot;Обработка ошибок...&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled         = True

                strSourceFolder = document.getElementByID(&quot;SourceFolder&quot;).value
                
                .getElementByID(&quot;tagBody&quot;).style.cursor          = &quot;auto&quot;
                End With
                
                Set objFSO      = CreateObject(&quot;Scripting.FileSystemObject&quot;)
                Set objFolder   = objFSO.GetFolder(strSourceFolder)
                
                
                Set objService  = GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\.\root\CIMV2&quot;)
                    If Err.Number &lt;&gt; 0 Then
                        msgbox Err.Number &amp; &quot;: &quot; &amp; Err.Description
                    End If
                    For Each objProc In objService.ExecQuery(&quot;SELECT * FROM Win32_Process WHERE Name = &#039;winword.exe&#039;&quot;)
                            objProc.Terminate
                            &#039;objFile.MoveFile(strSourceFolder)
                    Next
        &#039;====================================================================================================
        &#039;2. Удаление временного файла objFile.Path &amp; &quot;~$&quot; &amp; objFile.Name ??? не чего в голову не приходит
        &#039;====================================================================================================
        
        
        
        
        &#039;====================================================================================================
        &#039;3.
        &#039;====================================================================================================
                strFolderName      = &quot;Bad_File&quot;
                strFullFolderName  = objFSO.BuildPath(strSourceFolder, strFolderName)
                If objFSO.FolderExists(strFullFolderName) Then
                    &#039;msgbox &quot;Folder [&quot; &amp; strFullFolderName &amp; &quot;] already exists.&quot;
                    Else
                    objFSO.CreateFolder strFullFolderName
                    &#039;msgbox &quot;Folder [&quot; &amp; strFullFolderName &amp; &quot;] created.&quot;
                End If
                    For Each objFile In objFolder.Files
                        objFile.Copy strSourceFolder, strFullFolderName
                    Next
                            
                Set objFile   = Nothing
                Set objFSO    = Nothing
                Set objFolder = Nothing
                
            end Sub
        &#039;===================================================================================================
        
    &lt;/script&gt;
    &lt;body id=&quot;tagBody&quot; scroll=&quot;auto&quot;&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFolder&quot;&gt;1. Укажите исходную папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;SourceFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectSourceFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblDestFolder&quot;&gt;2. Укажите целевую папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;DestFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectDestFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFormat&quot;&gt;3. Выберете формат исходных файлов&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;select size=&quot;1&quot; name=&quot;SourceFormat&quot;&gt;
                    &lt;option value=&quot;txt&quot;&gt;.txt&lt;/option&gt;
                    &lt;option value=&quot;htm&quot;&gt;.htm&lt;/option&gt;
                    &lt;option value=&quot;html&quot;&gt;.html&lt;/option&gt;
                    &lt;option value=&quot;doc&quot;&gt;.doc&lt;/option&gt;
                    &lt;option value=&quot;rtf&quot;&gt;.rtf&lt;/option&gt;
                    &lt;option value=&quot;mht&quot;&gt;.mht&lt;/option&gt;
                &lt;/select&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblDestFormat&quot;&gt;4. Выберете формат целевых файлов&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;select size=&quot;1&quot; name=&quot;DestFormat&quot;&gt;
                    &lt;option value=&quot;rtf&quot;&gt;.rtf&lt;/option&gt;
                    &lt;option value=&quot;doc&quot;&gt;.doc&lt;/option&gt;
                    &lt;option value=&quot;txt&quot;&gt;.txt&lt;/option&gt;
                    &lt;option value=&quot;htm&quot;&gt;.htm&lt;/option&gt;
                    &lt;option value=&quot;html&quot;&gt;.html&lt;/option&gt;
                &lt;/select&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;!-- 
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span&gt;5. Установите флажок использовать исходную папку как и целевую. (На будующее)&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;CheckBox&quot; name=&quot;SourceFolderAfter&quot;&gt;
                &lt;span id=&quot;lblSourceFolderAfter&quot;&gt;Использовать исходную папку&lt;/span&gt;
            &lt;/span&gt;
        &lt;/span&gt; 
        --&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span&gt;5. Установите флажок для удаления файлов из исходной папки после обработки&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;CheckBox&quot; name=&quot;DeleteAfterProcessing&quot;&gt;
                &lt;span id=&quot;lblDeleteAfterProcessing&quot;&gt;Удалять исходные файлы&lt;/span&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblConvert&quot;&gt;6. Нажмите кнопку &amp;quot;Конвертировать&amp;quot;&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;Convert&quot; value=&quot;Конвертировать&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;hr class=&quot;Row&quot; /&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span id=&quot;Status&quot;&gt;&amp;nbsp;&lt;/span&gt;
        &lt;/span&gt;
    &lt;/body&gt;
    &lt;script language=&quot;VBScript&quot;&gt;
        With window
            .resizeTo tagBody.scrollWidth + 50, tagBody.scrollHeight + 32
            .moveTo (.screen.availWidth - tagBody.offsetWidth) \ 2, (.screen.availHeight - tagBody.offsetHeight) \ 2
        End With
    &lt;/script&gt;
&lt;/html&gt;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-12-03T10:29:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42439#p42439</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42301#p42301" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>alexii пишет:</cite><blockquote><div class="quotebox"><blockquote><p>Для другой версии Office измените константы форматов конвертировамия</p></blockquote></div><p>А они что, менялись?</p></blockquote></div><p>Что то не посмотрел, на работе Office 2007 стоит, проверил форматы не изменились.<br />Прикручу обработку ошибок, и еще кое что, потом выложу.</p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-28T23:50:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42301#p42301</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42292#p42292" />
			<content type="html"><![CDATA[<p><span style="color: Green">Про <a href="http://forum.script-coding.com/rules.html#7.4.">исправления</a>.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-28T11:09:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42292#p42292</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42291#p42291" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>И еще если в конвертируемом файле есть ошибки (ссылки на внешние документы, не печатные символы в названии файла и т.д.)</p></blockquote></div><p>Вы что-то путаете, коллега. Это не ошибки, а вполне легальное содержимое.<br /></p><div class="quotebox"><blockquote><p>выйдет ошибка а Word будет висеть в процессах.</p></blockquote></div><p>Кто бы сомневался <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />.</p><p>Надеюсь, обработку ошибок Вы сами прикрутите.<br /></p><div class="quotebox"><blockquote><p>У меня была сохраненая страница урока фотошопа в MHT формате так при сохранении Word пытался сохранить файл на сайте откуда я скачал страницу прешлось интернет отключать.</p></blockquote></div><p>Word честно пытался перезагрузить рекламу, содержащуюся на странице, а отнюдь не «сохранить файл на сайте».</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-28T11:05:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42291#p42291</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42290#p42290" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Для другой версии Office измените константы форматов конвертировамия</p></blockquote></div><p>А они что, менялись?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-28T10:58:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42290#p42290</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42247#p42247" />
			<content type="html"><![CDATA[<p>Можно и так:<br /></p><div class="codebox"><pre><code>&lt;html id=&quot;appHTML&quot;&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;ru&quot;&gt;
        &lt;title&gt;Конвертер файлов&lt;/title&gt;
        &lt;hta:Application
            Icon = &quot;%ProgramFiles%\Microsoft Office\OFFICE11\WINWORD.EXE&quot;
            Id=&quot;oHTA&quot;
            ApplicationName=&quot;Конвертер файлов&quot;
            Border=&quot;normal&quot;
            BorderStyle=&quot;normal&quot;
            Caption=&quot;yes&quot;
            ContextMenu=&quot;no&quot;
            InnerBorder=&quot;yes&quot;
            MaximizeButton=&quot;no&quot;
            MinimizeButton=&quot;yes&quot;
            Navigable=&quot;no&quot;
            Scroll=&quot;auto&quot;
            ScrollFlat=&quot;no&quot;
            Selection=&quot;no&quot;
            ShowInTaskbar=&quot;yes&quot;
            SingleInstance=&quot;yes&quot;
            SysMenu=&quot;yes&quot;
            Version=&quot;1.0 RC2&quot;
            WindowState=&quot;normal&quot;
        /&gt;
        &lt;object classid=&quot;clsid:0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC&quot; id=&quot;MSScriptControl&quot;&gt;
            &lt;param name=&quot;Timeout&quot; value=&quot;10000&quot;&gt;
            &lt;param name=&quot;AllowUI&quot; value=&quot;-1&quot;&gt;
            &lt;param name=&quot;UseSafeSubset&quot; value=&quot;0&quot;&gt;
        &lt;/object&gt;
    &lt;/head&gt;
    
    &lt;style type=&quot;text/css&quot;&gt;
        BODY {
            font: x-small Verdana, Arial, sans-serif;
            color: WindowText;
            background-color: ButtonFace;
        }
        .Row{
            clear:both;
        }
        .Left{
            float:Left;
            clear:none;
        }
        .Right{
            float:Right;
            clear:none;
        }
        .NonValid { color:FireBrick; }
        #Status { font: xx-small; }
    &lt;/style&gt;
    
    &lt;script language=&quot;vbscript&quot;&gt;
        Option Explicit
        
        &#039;===================================================================================================
        Function SelectFolder()
            Const BIF_RETURNONLYFSDIRS = &amp;H0001
            Const BIF_EDITBOX          = &amp;H0010
            Const BIF_VALIDATE         = &amp;H0020
            Const BIF_NEWDIALOGSTYLE   = &amp;H0040
            
            Dim objShell
            Dim objFSO
            
            Dim lngHWND
            Dim intOptions
            Dim strRootFolder
            
            Dim objFolder
            Dim strTemp
            
            Set objFSO    = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            Set objShell  = CreateObject(&quot;Shell.Application&quot;)
            
            lngHWND       = oHTA.Document.GetElementByID(&quot;MSScriptControl&quot;).SitehWnd
            intOptions    = BIF_RETURNONLYFSDIRS Or BIF_NEWDIALOGSTYLE Or BIF_EDITBOX Or BIF_VALIDATE
            strRootFolder = 0
            
            Set objFolder = objShell.BrowseForFolder(lngHWND, &quot;Укажите папку&quot;, intOptions, strRootFolder)
            
            If Not objFolder Is Nothing Then
                If objFSO.FolderExists(objFolder.Self.Path) Then
                    SelectFolder = objFolder.Self.Path
                End If
            End If
            
            Set objFolder = Nothing
            Set objShell  = Nothing
            Set objFSO    = Nothing
        End Function
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectSourceFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                SourceFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectDestFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                DestFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnClick
            If ValidateFields() Then
                With document
                    .getElementByID(&quot;Status&quot;).innerText               = &quot;Идёт обработка…&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled          = True
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled    = True
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled            = True
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled      = True
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled          = True
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled = True
                    .getElementByID(&quot;Convert&quot;).disabled               = True
                    .getElementByID(&quot;DestFormat&quot;).disabled            = True
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor           = &quot;wait&quot;
                End With
                
                setTimeout &quot;Convert&quot;, 0
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnBlur()
            With document
                .getElementByID(&quot;Status&quot;).innerText                = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFolder&quot;).className          = &quot;&quot;
                
                .getElementByID(&quot;lblDestFolder&quot;).className         = &quot;&quot;
                .getElementByID(&quot;DestFolder&quot;).className            = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFormat&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFormat&quot;).className          = &quot;&quot;
                
                .getElementByID(&quot;lblDestFormat&quot;).className         = &quot;&quot;
                .getElementByID(&quot;DestFormat&quot;).className            = &quot;&quot;
                
            End With
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub lblDeleteAfterProcessing_OnClick()
            With document.getElementByID(&quot;DeleteAfterProcessing&quot;)
                .focus
                .checked = Not .checked
            End With
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Function ValidateFields()
            Dim objFSO
            Dim strValidateResult
            
            Dim strSourceFolder
            Dim strDestFolder
            
            Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            
            ValidateFields    = True
            strValidateResult = &quot;&quot;
            
            With document
                strSourceFolder = .getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = .getElementByID(&quot;DestFolder&quot;).value
                
                If Not objFSO.FolderExists(strSourceFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Исходная папка не найдена. &quot;
                    
                    .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;SourceFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                If Not objFSO.FolderExists(strDestFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Целевая папка не найдена. &quot;
                    
                    .getElementByID(&quot;lblDestFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;DestFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                .getElementByID(&quot;Status&quot;).innerText = strValidateResult
            End With
            
            Set objFSO = Nothing
        End Function 
        &#039;===================================================================================================
        
        &#039;===================================================================================================
            Sub Convert()
                Const wdFormatRTF = 6         &#039;RTF 2003
                Const wdFormatDocument = 0    &#039;DOC 2003 для формата office 97 = &quot;102&quot; без wdFormatDocument
                Const wdFormatText = 2        &#039;TXT обычный текст
                Const wdFormatHTML = 8        &#039;HTM, HTML на всякий случай.
                Const wdFormatWebArchive =9   &#039;MHT, MHTML случай всякий бывает.

                Dim objFSO
                Dim objFolder
                Dim objFile
                
                Dim objWord
                
                Dim strSourceFolder
                Dim strDestFolder
                
                Dim strSourceFormat
                Dim strDestFormat
                Dim wdstrDestFormat
                
                Dim boolDeleteAfterProcessing
                
                Dim StartTime
                
                
                StartTime       = Timer
                
                strSourceFolder = document.getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = document.getElementByID(&quot;DestFolder&quot;).value
                
                strSourceFormat = document.getElementByID(&quot;SourceFormat&quot;).value
                strDestFormat = document.getElementByID(&quot;DestFormat&quot;).value
                
                boolDeleteAfterProcessing = document.getElementByID(&quot;DeleteAfterProcessing&quot;).checked
                
                Set objFSO      = CreateObject(&quot;Scripting.FileSystemObject&quot;)
                Set objFolder   = objFSO.GetFolder(strSourceFolder)
                
                Set objWord     = CreateObject(&quot;Word.Application&quot;)
                
                Select Case strDestFormat
                       Case &quot;rtf&quot;
                            wdstrDestFormat = 6
                       Case &quot;doc&quot;
                            wdstrDestFormat = 0
                       Case &quot;txt&quot;
                            wdstrDestFormat = 2
                End Select
                
                For Each objFile In objFolder.Files
                    If UCase(objFSO.GetExtensionName(objFile)) = UCase(strSourceFormat) Then
                        With objWord.Documents.Open(objFile.Path)
                            .SaveAs objFSO.BuildPath(strDestFolder, objFSO.GetBaseName(objFile.Name) &amp; &quot;.&quot; &amp; strDestFormat), wdstrDestFormat
                            .Close
                        End With
                        
                        If boolDeleteAfterProcessing Then
                            objFile.Delete
                        End If
                    End If
                Next
                
                objWord.Quit
                Set objWord = Nothing
                
                Set objFile   = Nothing
                Set objFSO    = Nothing
                Set objFolder = Nothing
                
                With document
                    .getElementByID(&quot;Status&quot;).innerText = &quot;На обработку затрачено: &quot; &amp; _
                        TimeSerial(0, 0, Timer - StartTime) &amp; &quot;.&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled         = False
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled   = False
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled           = False
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled     = False
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled         = False
                    .getElementByID(&quot;DestFormat&quot;).disabled           = False
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled= False
                    .getElementByID(&quot;Convert&quot;).disabled              = False
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor          = &quot;auto&quot;
                End With
            End Sub
        &#039;===================================================================================================
    &lt;/script&gt;
    &lt;body id=&quot;tagBody&quot; scroll=&quot;auto&quot;&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFolder&quot;&gt;1. Укажите исходную папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;SourceFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectSourceFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblDestFolder&quot;&gt;2. Укажите целевую папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;DestFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectDestFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFormat&quot;&gt;3. Выберете формат исходных файлов&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;select size=&quot;1&quot; name=&quot;SourceFormat&quot;&gt;
                    &lt;option value=&quot;txt&quot;&gt;.txt&lt;/option&gt;
                    &lt;option value=&quot;htm&quot;&gt;.htm&lt;/option&gt;
                    &lt;option value=&quot;html&quot;&gt;.html&lt;/option&gt;
                    &lt;option value=&quot;doc&quot;&gt;.doc&lt;/option&gt;
                    &lt;option value=&quot;rtf&quot;&gt;.rtf&lt;/option&gt;
                &lt;/select&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblDestFormat&quot;&gt;4. Выберете формат целевых файлов&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;select size=&quot;1&quot; name=&quot;DestFormat&quot;&gt;
                    &lt;option value=&quot;rtf&quot;&gt;.rtf&lt;/option&gt;
                    &lt;option value=&quot;doc&quot;&gt;.doc&lt;/option&gt;
                    &lt;option value=&quot;txt&quot;&gt;.txt&lt;/option&gt;
                &lt;/select&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span&gt;5. Установите флажок для удаления файлов из исходной папки после обработки&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;CheckBox&quot; name=&quot;DeleteAfterProcessing&quot;&gt;
                &lt;span id=&quot;lblDeleteAfterProcessing&quot;&gt;Удалять исходные файлы&lt;/span&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblConvert&quot;&gt;6. Нажмите кнопку &amp;quot;Конвертировать&amp;quot;&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;Convert&quot; value=&quot;Конвертировать&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;hr class=&quot;Row&quot; /&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span id=&quot;Status&quot;&gt;&amp;nbsp;&lt;/span&gt;
        &lt;/span&gt;
    &lt;/body&gt;
    &lt;script language=&quot;VBScript&quot;&gt;
        With window
            .resizeTo tagBody.scrollWidth + 25, tagBody.scrollHeight + 32
            .moveTo (.screen.availWidth - tagBody.offsetWidth) \ 2, (.screen.availHeight - tagBody.offsetHeight) \ 2
        End With
    &lt;/script&gt;
&lt;/html&gt;</code></pre></div><p>Ну и понятно что нужен MS Office Word 2003. Для другой версии Office измените константы форматов конвертировамия </p><div class="codebox"><pre><code>....
Const wdFormatRTF = 6         &#039;RTF 2003
....</code></pre></div><p>И еще если в конвертируемом файле есть ошибки (ссылки на внешние документы, не печатные символы в названии файла и т.д.) выйдет ошибка а Word будет висеть в процессах. У меня была сохраненая страница урока фотошопа в MHT формате так при сохранении Word пытался сохранить файл на сайте откуда я скачал страницу прешлось интернет отключать.</p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-26T09:17:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42247#p42247</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42245#p42245" />
			<content type="html"><![CDATA[<p>Я в скриптах vbs, js, hta, vba не очень разбираюсь. Для конкретной задачи сначала ищу в интернете программы, если не нахожу пытаюсь приспособить тот скрипт который приблизительно подходит. Я уже писал <a href="http://forum.script-coding.com/viewtopic.php?id=4851">VBS: Копирование RAR распаковка.</a> мне надо было получить архив с локальной машины, распаковать определенный файл, а потом скопировать его на другую машину. Мне пришлось использовать две программы + vba скрипт который их запускает, пока это лучшее решение которое я нашел.</p><div class="quotebox"><blockquote><p>Вот, скажем, в событии «DblClick()» того же элемента управления предусмотрен параметр «Cancel», в событии «MouseMove» набор параметров «Button», «Shift», «X», «Y». Под них отводится место в стеке при вызове процедуры обработки события, они заполняются фактическими данными (если это входные параметры) и т.д.</p></blockquote></div><p>Я не программист. Так балуюсь с разными скриптами. В основном с vba, макросы пишу для упрощения некоторых задач.</p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-26T06:07:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42245#p42245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42236#p42236" />
			<content type="html"><![CDATA[<p>Примерно так:<br /></p><div class="codebox"><pre><code>&lt;html id=&quot;appHTML&quot;&gt;
    &lt;head&gt;
        &lt;meta charset=&quot;windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=windows-1251&quot;&gt;
        &lt;meta http-equiv=&quot;Content-Language&quot; content=&quot;ru&quot;&gt;
        &lt;title&gt;Конвертер файлов&lt;/title&gt;
        &lt;hta:Application
            Icon = &quot;%ProgramFiles%\Microsoft Office\OFFICE11\WINWORD.EXE&quot;
            Id=&quot;oHTA&quot;
            ApplicationName=&quot;Конвертер файлов&quot;
            Border=&quot;normal&quot;
            BorderStyle=&quot;normal&quot;
            Caption=&quot;yes&quot;
            ContextMenu=&quot;no&quot;
            InnerBorder=&quot;yes&quot;
            MaximizeButton=&quot;no&quot;
            MinimizeButton=&quot;yes&quot;
            Navigable=&quot;no&quot;
            Scroll=&quot;auto&quot;
            ScrollFlat=&quot;no&quot;
            Selection=&quot;no&quot;
            ShowInTaskbar=&quot;yes&quot;
            SingleInstance=&quot;yes&quot;
            SysMenu=&quot;yes&quot;
            Version=&quot;1.0 RC1&quot;
            WindowState=&quot;normal&quot;
        /&gt;
        &lt;object classid=&quot;clsid:0E59F1D5-1FBE-11D0-8FF2-00A0D10038BC&quot; id=&quot;MSScriptControl&quot;&gt;
            &lt;param name=&quot;Timeout&quot; value=&quot;10000&quot;&gt;
            &lt;param name=&quot;AllowUI&quot; value=&quot;-1&quot;&gt;
            &lt;param name=&quot;UseSafeSubset&quot; value=&quot;0&quot;&gt;
        &lt;/object&gt;
    &lt;/head&gt;
    
    &lt;style type=&quot;text/css&quot;&gt;
        BODY {
            font: x-small Verdana, Arial, sans-serif;
            color: WindowText;
            background-color: ButtonFace;
        }
        .Row{
            clear:both;
        }
        .Left{
            float:Left;
            clear:none;
        }
        .Right{
            float:Right;
            clear:none;
        }
        .NonValid { color:FireBrick; }
        #Status { font: xx-small; }
    &lt;/style&gt;
    
    &lt;script language=&quot;vbscript&quot;&gt;
        Option Explicit
        
        &#039;===================================================================================================
        Function SelectFolder()
            Const BIF_RETURNONLYFSDIRS = &amp;H0001
            Const BIF_EDITBOX          = &amp;H0010
            Const BIF_VALIDATE         = &amp;H0020
            Const BIF_NEWDIALOGSTYLE   = &amp;H0040
            
            Dim objShell
            Dim objFSO
            
            Dim lngHWND
            Dim intOptions
            Dim strRootFolder
            
            Dim objFolder
            Dim strTemp
            
            Set objFSO    = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            Set objShell  = CreateObject(&quot;Shell.Application&quot;)
            
            lngHWND       = oHTA.Document.GetElementByID(&quot;MSScriptControl&quot;).SitehWnd
            intOptions    = BIF_RETURNONLYFSDIRS Or BIF_NEWDIALOGSTYLE Or BIF_EDITBOX Or BIF_VALIDATE
            strRootFolder = 0
            
            Set objFolder = objShell.BrowseForFolder(lngHWND, &quot;Укажите папку&quot;, intOptions, strRootFolder)
            
            If Not objFolder Is Nothing Then
                If objFSO.FolderExists(objFolder.Self.Path) Then
                    SelectFolder = objFolder.Self.Path
                End If
            End If
            
            Set objFolder = Nothing
            Set objShell  = Nothing
            Set objFSO    = Nothing
        End Function
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectSourceFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                SourceFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub SelectDestFolder_OnClick
            Dim strSelectedFolder
            
            strSelectedFolder = Trim(SelectFolder())
            
            If Len(strSelectedFolder) &lt;&gt; 0 Then
                DestFolder.value = strSelectedFolder
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnClick
            If ValidateFields() Then
                With document
                    .getElementByID(&quot;Status&quot;).innerText               = &quot;Идёт обработка…&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled          = True
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled    = True
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled            = True
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled      = True
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled          = True
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled = True
                    .getElementByID(&quot;Convert&quot;).disabled               = True
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor           = &quot;wait&quot;
                End With
                
                setTimeout &quot;Convert&quot;, 0
            End If
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub Convert_OnBlur()
            With document
                .getElementByID(&quot;Status&quot;).innerText                = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFolder&quot;).className          = &quot;&quot;
                
                .getElementByID(&quot;lblDestFolder&quot;).className         = &quot;&quot;
                .getElementByID(&quot;DestFolder&quot;).className            = &quot;&quot;
                
                .getElementByID(&quot;lblSourceFormat&quot;).className       = &quot;&quot;
                .getElementByID(&quot;SourceFormat&quot;).className          = &quot;&quot;
            End With
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Sub lblDeleteAfterProcessing_OnClick()
            With document.getElementByID(&quot;DeleteAfterProcessing&quot;)
                .focus
                .checked = Not .checked
            End With
        End Sub
        &#039;===================================================================================================
        
        &#039;===================================================================================================
        Function ValidateFields()
            Dim objFSO
            Dim strValidateResult
            
            Dim strSourceFolder
            Dim strDestFolder
            
            Set objFSO = CreateObject(&quot;Scripting.FileSystemObject&quot;)
            
            ValidateFields    = True
            strValidateResult = &quot;&quot;
            
            With document
                strSourceFolder = .getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = .getElementByID(&quot;DestFolder&quot;).value
                
                If Not objFSO.FolderExists(strSourceFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Исходная папка не найдена. &quot;
                    
                    .getElementByID(&quot;lblSourceFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;SourceFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                If Not objFSO.FolderExists(strDestFolder) Then
                    strValidateResult = strValidateResult &amp; &quot;Целевая папка не найдена. &quot;
                    
                    .getElementByID(&quot;lblDestFolder&quot;).className       = &quot;NonValid&quot;
                    .getElementByID(&quot;DestFolder&quot;).className          = &quot;NonValid&quot;
                    
                    ValidateFields = False
                End If
                
                .getElementByID(&quot;Status&quot;).innerText = strValidateResult
            End With
            
            Set objFSO = Nothing
        End Function 
        &#039;===================================================================================================
        
        &#039;===================================================================================================
            Sub Convert()
                Const wdFormatRTF = 6
                
                Dim objFSO
                Dim objFolder
                Dim objFile
                
                Dim objWord
                
                Dim strSourceFolder
                Dim strDestFolder
                
                Dim strSourceFormat
                
                Dim boolDeleteAfterProcessing
                
                Dim StartTime
                
                
                StartTime       = Timer
                
                strSourceFolder = document.getElementByID(&quot;SourceFolder&quot;).value
                strDestFolder   = document.getElementByID(&quot;DestFolder&quot;).value
                
                strSourceFormat = document.getElementByID(&quot;SourceFormat&quot;).value
                
                boolDeleteAfterProcessing = document.getElementByID(&quot;DeleteAfterProcessing&quot;).checked
                
                Set objFSO      = CreateObject(&quot;Scripting.FileSystemObject&quot;)
                Set objFolder   = objFSO.GetFolder(strSourceFolder)
                
                Set objWord     = CreateObject(&quot;Word.Application&quot;)
                
                For Each objFile In objFolder.Files
                    If UCase(objFSO.GetExtensionName(objFile)) = UCase(strSourceFormat) Then
                        With objWord.Documents.Open(objFile.Path)
                            .SaveAs objFSO.BuildPath(strDestFolder, objFSO.GetBaseName(objFile.Name) &amp; &quot;.rtf&quot;), wdFormatRTF
                            .Close
                        End With
                        
                        If boolDeleteAfterProcessing Then
                            objFile.Delete
                        End If
                    End If
                Next
                
                objWord.Quit
                Set objWord = Nothing
                
                Set objFile   = Nothing
                Set objFSO    = Nothing
                Set objFolder = Nothing
                
                With document
                    .getElementByID(&quot;Status&quot;).innerText = &quot;На обработку затрачено: &quot; &amp; _
                        TimeSerial(0, 0, Timer - StartTime) &amp; &quot;.&quot;
                    
                    .getElementByID(&quot;SourceFolder&quot;).disabled         = False
                    .getElementByID(&quot;SelectSourceFolder&quot;).disabled   = False
                    
                    .getElementByID(&quot;DestFolder&quot;).disabled           = False
                    .getElementByID(&quot;SelectDestFolder&quot;).disabled     = False
                    
                    .getElementByID(&quot;SourceFormat&quot;).disabled         = False
                    .getElementByID(&quot;DeleteAfterProcessing&quot;).disabled= False
                    .getElementByID(&quot;Convert&quot;).disabled              = False
                    
                    .getElementByID(&quot;tagBody&quot;).style.cursor          = &quot;auto&quot;
                End With
            End Sub
        &#039;===================================================================================================
    &lt;/script&gt;
    &lt;body id=&quot;tagBody&quot; scroll=&quot;auto&quot;&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFolder&quot;&gt;1. Укажите исходную папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;SourceFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectSourceFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblDestFolder&quot;&gt;2. Укажите целевую папку&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;text&quot; name=&quot;DestFolder&quot; size=&quot;64&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;SelectDestFolder&quot; value=&quot;…&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblSourceFormat&quot;&gt;3. Выберете формат исходных файлов&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;select size=&quot;1&quot; name=&quot;SourceFormat&quot;&gt;
                    &lt;option value=&quot;txt&quot;&gt;.txt&lt;/option&gt;
                    &lt;option value=&quot;htm&quot;&gt;.htm&lt;/option&gt;
                    &lt;option value=&quot;doc&quot;&gt;.doc&lt;/option&gt;
                &lt;/select&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span&gt;4. Установите флажок для удаления файлов из исходной папки после обработки&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;CheckBox&quot; name=&quot;DeleteAfterProcessing&quot;&gt;
                &lt;span id=&quot;lblDeleteAfterProcessing&quot;&gt;Удалять исходные файлы&lt;/span&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span class=&quot;left&quot;&gt;
                &lt;span id=&quot;lblConvert&quot;&gt;5. Нажмите кнопку &amp;quot;Конвертировать&amp;quot;&lt;/span&gt;
            &lt;/span&gt;
            &lt;span class=&quot;right&quot;&gt;
                &lt;input type=&quot;Button&quot; name=&quot;Convert&quot; value=&quot;Конвертировать&quot;&gt;
            &lt;/span&gt;
        &lt;/span&gt;
        &lt;hr class=&quot;Row&quot; /&gt;
        &lt;span class=&quot;Row&quot;&gt;
            &lt;span id=&quot;Status&quot;&gt;&amp;nbsp;&lt;/span&gt;
        &lt;/span&gt;
    &lt;/body&gt;
    &lt;script language=&quot;VBScript&quot;&gt;
        With window
            .resizeTo tagBody.scrollWidth + 25, tagBody.scrollHeight + 32
            .moveTo (.screen.availWidth - tagBody.offsetWidth) \ 2, (.screen.availHeight - tagBody.offsetHeight) \ 2
        End With
    &lt;/script&gt;
&lt;/html&gt;</code></pre></div><div class="quotebox"><cite>Kobrasol пишет:</cite><blockquote><div class="quotebox"><cite>alexii пишет:</cite><blockquote><p>(кстати, откуда там вообще взялись аргументы «TextBox1, TextBox2» smile?)</p></blockquote></div><p>там же, где и Forms.Form.1 в реестре. Нужны для указания путей до файлов. Вобще это &quot;Microsoft Forms 2.0&quot;, библиотека &quot;C:\WINDOWS\system32\FM20.DLL&quot;, по моему с Office 2003 ставится.</p></blockquote></div><p>Я сие и имел в виду. Откуда, спрашивается, возьмутся фактические аргументы, когда в событии не предусмотрено существование таких параметров в процедуре обработки события?! Вот, скажем, в событии «DblClick()» того же элемента управления предусмотрен параметр «Cancel», в событии «MouseMove» набор параметров «Button», «Shift», «X», «Y». Под них отводится место в стеке при вызове процедуры обработки события, они заполняются фактическими данными (если это входные параметры) и т.д.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-25T20:49:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42236#p42236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42212#p42212" />
			<content type="html"><![CDATA[<p>Лишнее сообщение вышло. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-25T05:08:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42212#p42212</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42211#p42211" />
			<content type="html"><![CDATA[<p>Чет не получается. :(<br />Вот простой вариант:<br /></p><div class="codebox"><pre><code>&lt;html&gt;
&lt;head&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; CHARSET=Windows-1251&quot;/&gt;
&lt;title&gt;
Конвертер файлов.
&lt;/title&gt;
&lt;hta:application
id = &quot;Конвертер файлов&quot;
MAXIMIZEBUTTON = &quot;no&quot;
MINIMIZEBUTTON = &quot;no&quot;
SCROLL=&quot;no&quot;
NAVIGABLE = &quot;yes&quot;
applicationName = &quot;Конвертер&quot;
/&gt;
&lt;/head&gt;
&lt;body bgcolor=buttonface style=&quot;border: none; font: 8pt sans-serif&quot; scroll=no text=buttontext&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
//размеры окна
var winWidth=600; // ширина окна
var winHeight=120; // высота окна
// изменяем размер
window.resizeTo(winWidth, winHeight);
// окно в центр экрана
var winPosX=screen.width/2-winWidth/2;
var winPosY=screen.height/2-winHeight/2;
window.moveTo(winPosX, winPosY);
&lt;/script&gt;
&lt;script language=&quot;vbscript&quot;&gt;
&#039;*************************************************************************************************************
    Option Explicit
    Const wdFormatRTF = 6 &#039;MS Office Word 2003
    Dim objFSO
    Dim objFolder
    Dim objFile
    Dim objWord
    Dim strSourceFolder
    Dim strDestFolder
    
    Sub ALLRTF(F1, F2, RS1)

    
    strSourceFolder = F1.value
    strDestFolder   = F2.value
    
    Set objFSO    = CreateObject(&quot;Scripting.FileSystemObject&quot;)
    Set objFolder = objFSO.GetFolder(strSourceFolder)
    
    Set objWord   = CreateObject(&quot;Word.Application&quot;)
    
    For Each objFile In objFolder.Files
        If UCase(objFSO.GetExtensionName(objFile)) = UCase(RS1.value) Then
            With objWord.Documents.Open(objFile.Path)
            .SaveAs objFSO.BuildPath(strDestFolder, objFSO.GetBaseName(objFile.Name) &amp; &quot;.rtf&quot;), wdFormatRTF
            .Close
        End With
    
            objFile.Delete
        End If
    Next
    
    objWord.Quit
    Set objWord = Nothing

    Set objFile   = Nothing
    Set objFSO    = Nothing
    Set objFolder = Nothing
    
    End Sub
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;&lt;TABLE&gt;
&lt;TR&gt;
    &lt;TD&gt;Исходная папка:&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;input name = &quot;F1&quot; size=&quot;10&quot; style=&quot;text-align: center&quot; value=&quot;C:\books\txt\&quot;&gt;&lt;/TD&gt;
    &lt;TD&gt;Конечная папка:&amp;nbsp;&lt;/TD&gt;
    &lt;TD&gt;&lt;input name = &quot;F2&quot; size=&quot;10&quot; style=&quot;text-align: center&quot; value=&quot;C:\books\rtf\&quot;&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
    &lt;TD&gt; Формат исходного файла: &lt;/TD&gt;
    &lt;TD&gt; &lt;select size=&quot;1&quot; name=&quot;RS1&quot;&gt;
    &lt;option selected value=&quot;txt&quot;&gt;txt&lt;/option&gt;
    &lt;option value=&quot;htm&quot;&gt;htm&lt;/option&gt;
    &lt;option value=&quot;doc&quot;&gt;doc&lt;/option&gt;
    &lt;/select&gt;&lt;/TD&gt;
    &lt;TD&gt;&lt;input type=&quot;button&quot; name=&quot;button&quot; value=&quot;Конвертировать&quot;  onClick=&quot;ALLRTF(F1, F2, RS1)&quot;&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TABLE&gt;
&lt;/body&gt;
&lt;/html&gt;</code></pre></div><div class="quotebox"><blockquote><p>(кстати, откуда там вообще взялись аргументы «TextBox1, TextBox2» ?)</p></blockquote></div><p>там же, где и Forms.Form.1 в реестре. Нужны для указания путей до файлов. Вобще это &quot;Microsoft Forms 2.0&quot;, библиотека &quot;C:\WINDOWS\system32\FM20.DLL&quot;, по моему с Office 2003 ставится.</p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-25T05:04:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42211#p42211</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42112#p42112" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Kobrasol пишет:</cite><blockquote><p>Можно конечно и через HTML разметку сделать. Но интересно попробовать без нее.</p></blockquote></div><p>Пробуйте. Как реализуете привязку событий элементов управления MS Forms к процедурам обработки событий<br /></p><div class="codebox"><pre><code>Sub CommandButton1_Click()</code></pre></div><p>(кстати, откуда там вообще взялись аргументы «TextBox1, TextBox2» <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" />?)<br />выкладывайте.</p><p>Не понятно, зачем тогда было переходить на другой хост, а не оставаться целиком в рамках MS Office.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-23T17:48:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42112#p42112</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42097#p42097" />
			<content type="html"><![CDATA[<p>Понятно что в HTA нет VBA. Я дополнительные параметры искал </p><div class="codebox"><pre><code>&#039;Создание формы
    &#039;.....
    Set Label1 = Form1.Controls.Add(&quot;Forms.Label.1&quot;, &quot;Label&quot;, True)
    Label1.font.size = 10
    Label1.caption = &quot;Исходная папка:&quot;
    Label1.left = 10
    Label1.top = 10
    Label1.width = 100
    &#039;.....</code></pre></div><p>Просто не знал, где их найти, ну и заглянул в VBA.<br />У меня задумка, конвертер для других форматов сделать.</p><p>Можно конечно и через HTML разметку сделать. Но интересно попробовать без нее.</p>]]></content>
			<author>
				<name><![CDATA[Kobrasol]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26175</uri>
			</author>
			<updated>2010-11-23T08:34:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42097#p42097</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42095#p42095" />
			<content type="html"><![CDATA[<p>В HTA нет VBA, только VBScript (естественно, объектная модель MS Office/MS Word остаётся без изменений). Для примера предлагаю ознакомиться с этой темой: <a href="http://forum.script-coding.com/viewtopic.php?id=2560">VBS: Поиск слов в WinWord (2003)</a> и выжимками из неё: <a href="http://forum.script-coding.com/viewtopic.php?id=2612">HTA: Нанесение (расстановка) OMR-меток в файле MS Word</a>.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-23T07:53:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42095#p42095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: HTA: Конвертер текстовых файлов в формат RTF, DOC, TXT]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=42094#p42094" />
			<content type="html"><![CDATA[<p><span style="color: Green">Ссылка на конкретный пост находится слева, там, где приведено дата/время поста. Поправил ссылку.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2010-11-23T07:44:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=42094#p42094</id>
		</entry>
</feed>
