Select an MS Word document to be converted.
Stack Overflow x Dismiss, using MS Word 2010, i have a macro that converts a Word document from docx format to txt format.
I found the following VBA code on the Internet and it works fine except for what I just indicated about the Word message.Do you want to continue saving the document?Click the, convert button.Double click on the My Documents folder from your desktop and then double click on the greeting cx file.To preserve this content, click No to exit this dialog box, and then choose another encoding that supports the languages in this document.However there are some documents that stop during conversion with the following notification: "The document may contain text content that will be lost upon conversion to the chosen encoding.1) 6 2) 7 3) 8 4).
Free usage OF THE services does NOT represent OR warrant TO YOU that: (A) your USE OF THE services will meet your requirements, (B) your USE OF THE services will BE uninterrupted, timely, secure OR free from error, (C) ANY information obtained BY YOU aesult.
I am a complete novice to VBA.
Case Is "TXT" strDocName strDocName ".txt" veAs FileName:strDocName, Fileformat:wdFormatText, windows vista home premium sp1 oem pl serial case Is "RTF" strDocName strDocName ".rtf" veAs FileName:strDocName, Fileformat:wdFormatRTF, case Is "html" strDocName strDocName ".html" veAs FileName:strDocName, Fileformat:wdFormathtml.
Yes/No" Of course I want to continue to save the document as txt so I have to click the Yes button.
If the file cannot be converted the reason of the fail is shown in red.
Dim oFile As Object, dim strDocName As String, dim intPos As Integer.
Here is the code: Sub ChangDocsToTxtOrRTForhtml 'with export to PDF in word 2007.Enjoy, advertisements, please, select a file to be converted Only DOC/docx files are supported.Only 20 files can be converted at once.Case Is 12, do fileType UCase(InputBox Change DOC to TXT, RTF, html, or PDF(2007 only "File Conversion "TXT.Set tFolder tFolder(locFolder "Converted for Each oFile In les, dim d As Document.Terms OF service.Loop Until (fileType "TXT" Or fileType "RTF" Or fileType "html.YOU understand AND agree that your USE OF THE services IS AT your OWN risk AND that THE services ARE provided "AS IS" AND "AS available".Convert batch of files (MS Word files in ZIP) online: Note: You don't have to have MS Word installed on your.Converting, it may take several minutes, advertisements.Try: veAs _ FileName:strDocName, _ Fileformat:wdFormatText, _ instead of: veAs FileName:strDocName, Fileformat:wdFormatText Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email question feed.End Select reenUpdating False, set fs set oFolder tFolder(locFolder set tFolder eateFolder(locFolder "Converted.