Loading ...
Sorry, an error occurred while loading the content.

Re: Are there any clips to covert .doc to .txt?

Expand Messages
  • Doug Offen
    Thanks for the suggestions everyone. It looks like I ll have to work with openoffice and their macros. I was hoping to be able to find a clip in notetab
    Message 1 of 26 , May 27, 2006
    • 0 Attachment
      Thanks for the suggestions everyone.

      It looks like I'll have to work with openoffice and their macros.

      I was hoping to be able to find a clip in notetab because I like
      working with notetab so much. I guess notetab can only do so much.

      Thanks again for the help. It will take a while to filter through the
      different suggestions.

      Doug Offen

      P.S. sorry for that long sample post Jody. I couldn't see any other
      way to show the three parts of a doc file opened in notetab than to
      just copy and paste one sample.
    • Larry Hamilton
      ... Doug, If you really want to do it in NoteTab, you can open a bunch of docs in NoteTab and select the information at the top and copy it to the Find portion
      Message 2 of 26 , May 27, 2006
      • 0 Attachment
        Doug Offen wrote:
        > Thanks for the suggestions everyone.
        >
        > It looks like I'll have to work with openoffice and their macros.
        >
        > I was hoping to be able to find a clip in notetab because I like
        > working with notetab so much. I guess notetab can only do so much.
        >
        > Thanks again for the help. It will take a while to filter through the
        > different suggestions.
        Doug,

        If you really want to do it in NoteTab, you can open a bunch of docs in
        NoteTab and select the information at the top and copy it to the Find
        portion of the Find & Replace dialog and mark all files and it will
        replace that stuff with nothing, thus taking it out of the file. This
        can then be done with the other two sections. However, this assumes that
        the sections are all the same.

        If the entire section is not identical in all docs, but the beginng and
        ending characters are the same for each section, you could use a clip to
        do it.

        Here is a clip that I used to use for replacing the last updated date in
        HTML files before I had access to PHP or Perl. It assumes all the files
        you want to work with are open. I have the save command commented out
        because I would review each file then if they were okay, I would use the
        menu option to SaveAll.

        This clip works on documents that have similar structure with identical
        elements to allow the start and end variables to refer to the same piece
        of each file. If this holds true for your doc files, you can use the
        same idea. As always use a copy to work on in case you do not want to
        loose information.

        I forget who first showed me the trick with the start and end variables,
        but it has been a lifesaver over the years when working on a lot of
        documents.

        I have another clip I built to open Word docs in Word and copy out the
        header, body, and footer. It is time consuming, but basically does what
        you have to do by hand. This clip might work with the Word viewer. It
        has been too long since I used Word viewer to know if it can get at the
        text in the header & footer. The clip will follow the first.

        H="Replace Last Updated"
        ;Created: about 1999 or 2000.
        ;Author: Larry Hamilton lmh at hamiltongensociety dotgoeshere org
        ^!Set %COUNTER%=0
        ^!Set %DocCount%=^$GetDocCount$
        ^!StatusClose
        ^!StatusShow Updating "Last Updated"
        :LOOP
        ^!Inc:%COUNTER%
        ^!SetDocIndex ^%COUNTER%

        ^!IF ^%COUNTER% > ^%DocCount% END ELSE NEXT
        ^!Open ^$GetDocName(^%COUNTER%)$
        ^!Find "Last updated " GW
        ^!IfError End
        ^!Select 0
        ^!Set %End%=^$GetRow$:^$GetCol$
        ^!SetCursor ^%Start%
        ^!SelectTo ^%End%
        ^!Keyboard DELETE
        ^$GetDate(mmmm dd, yyyy)$
        ^!Goto LOOP
        ;^!Save

        Watch for lots of long lines, email may really mess up this one.

        H="Doc2Txt"
        ;March 05, 2002 Larry Hamilton lmh at hamiltongensociety dotgoeshere org
        ;Brute force method to open Word document, and use toolbar commands to
        copy headers and footers from document. The commandline tools I found do
        not pull out the header and footer text. Only Word saving as Text does so.
        ;^!ShellWait "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"

        ^!ClearVariables
        ^!SetDebug ON
        ;^!Set %directory%=^?[(T=D)Please give full directory path: ending in
        backslash]
        ;^!Set %Ext%=^?[Choose extension==*.doc|*.txt|*.rtf|*.*]

        ;^!Set %File%=^$GetFileFirst("c:\Documents and Settings\Lawrence\My
        Documents";*.doc)$
        ^!Set %File%=^$GetFileFirst("c:\Census";*.doc)$
        ;^!SetArray %Files%=^$GetFiles("c:\HNGS\Census";*.doc)$
        ;^!SetArray %Files%=^$GetFiles("c:\Documents and Settings\Lawrence\My
        Documents";*.doc)$
        ^!ChDir C:\Census
        :LOOP
        ;^!Info ^%File% > ^$GetName(^%File%)$.txt

        ^!"C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
        ^$GetShort(^%File%)$

        ^!SetHintInfo ^$GetDate(hh:nn:ss am/pm dddd, mmmm dd, yyyy)$
        ^!FocusApp "Microsoft Word - ^$GetName(^%File%)$"
        ^!IfDiff "^$GetAppTitle$" "Microsoft Word - ^$GetName(^%File%)$" Skip_-2
        ^!StatusClose
        ^!Delay 15
        ;The following Keyboard sequence will save the currently opened document
        with the same name in TXT format. It puts the headers & footers at the
        end of the file, so it still needs to be cleaned up.
        ^!Keyboard ALT+F A &100 TAB &100 T &100 ENTER

        ^!Set %File%=^$GetFileNext$
        ^!GoTo LOOP
        ^!CloseFileFind

        HTH,

        --
        Larry Hamilton
        Kairos Computer Solutions
        http://www.kairoscomputers.com/
        Sales Affiliate for Grisoft Anti-Virus
      • Scott Fordin
        I ve seen doc2txt (or doc2text or doctotext) converters, but most cost real money, except on Linux. You might try instead using a doc2rtf converter. Try a
        Message 3 of 26 , May 27, 2006
        • 0 Attachment
          I've seen doc2txt (or doc2text or doctotext) converters, but most
          cost real money, except on Linux. You might try instead using a
          doc2rtf converter. Try a Google for that. I've seen free versions
          of the package for Windows.

          Scott

          Doug Offen wrote:
          > Thanks for the suggestions everyone.
          >
          > It looks like I'll have to work with openoffice and their macros.
          >
          > I was hoping to be able to find a clip in notetab because I like
          > working with notetab so much. I guess notetab can only do so much.
          >
          > Thanks again for the help. It will take a while to filter through the
          > different suggestions.
          >
          > Doug Offen
          >
          > P.S. sorry for that long sample post Jody. I couldn't see any other
          > way to show the three parts of a doc file opened in notetab than to
          > just copy and paste one sample.
          >
          >
          >
          >
          >
          >
          >
          >
          > Fookes Software: http://www.fookes.us, http://www.fookes.com
          > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
          >
          >
        • hsavage
          ... Doug, Don t give up yet, I m working on a clip, using Word, to convert docs to txt in real time, by playing the proper ^!Keyboard sequences to load the
          Message 4 of 26 , May 27, 2006
          • 0 Attachment
            Doug Offen wrote:
            > Thanks for the suggestions everyone.
            >
            > It looks like I'll have to work with openoffice and their macros.
            >
            > I was hoping to be able to find a clip in notetab because I like
            > working with notetab so much. I guess notetab can only do so much.
            >
            > Thanks again for the help. It will take a while to filter through the
            > different suggestions.
            >
            > Doug Offen

            Doug,

            Don't give up yet, I'm working on a clip, using Word, to convert docs to
            txt in real time, by playing the proper ^!Keyboard sequences to load the
            selected file,, save as text, close the file, then move on to the next
            selected file.

            I have the basics in a clip already, just need to get the timing down.
            So far I can only save the text file to the same folder the doc file is
            in but separate source and destination folders will come after I have
            the initial, repetitive mechanics, worked out.

            I don't know if you're using Word or Open Office but the necessary
            keystrokes to do the operation should be reasonably easy to work out
            without too much trouble.

            ºvº
            06.05.27_18.51
            -Newspaper HeadLine...
            "Local High School Dropouts Cut in Half"
            hrs ø hsavage@...
          • Sheri
            Hi Doug, Just a thought but might the junk above and below the real text always be the same size in your files? The sample doc you posted could be converted in
            Message 5 of 26 , May 27, 2006
            • 0 Attachment
              Hi Doug,

              Just a thought but might the junk above and below the real text always
              be the same size in your files? The sample doc you posted could be
              converted in Notetab like this:

              H="Convert Sample Doc"
              ^!Select all
              ^$StrDeleteRight("^$StrDeleteLeft("^$GetText$";2412)$";22010)$
              ;end of clip
            • Alan_C
              ... http://wvware.sourceforge.net/ http://www.abisource.com/ http://www.abisource.com/download/ (U r already using Open Office org) I ran across those above.
              Message 6 of 26 , May 28, 2006
              • 0 Attachment
                On Friday 26 May 2006 08:02, Doug Offen wrote:
                > I am wishing to convert a bunch of *.doc files to *.txt files to use
                > in notetab.

                http://wvware.sourceforge.net/

                http://www.abisource.com/

                http://www.abisource.com/download/

                (U'r already using Open Office org) I ran across those above. Abiword often
                is on Linux.

                Other than that, I don't know anything about those above.

                I think there's Perl modules for the task
              • rpdooling
                ... HRS, I thought he said that he doesn t have a copy of Word. He has Open Office. rick
                Message 7 of 26 , May 28, 2006
                • 0 Attachment
                  >> Don't give up yet, I'm working on a clip, using Word,

                  HRS,

                  I thought he said that he doesn't have a copy of Word. He has Open Office.

                  rick
                • rpdooling
                  ... And several Python scripts. I have one I adapted from the Python Cookbook, or this one is popular:
                  Message 8 of 26 , May 28, 2006
                  • 0 Attachment
                    >> I think there's Perl modules for the task

                    And several Python scripts. I have one I adapted from the Python
                    Cookbook, or this one is popular:

                    http://www.freewisdom.org/projects/python-markdown/odt2txt.php

                    You can install Python in about four minutes, using these instructions:

                    http://www.richarddooling.com/index.php/category/geekophilia

                    rick
                  • hsavage
                    ... Office. ... Rick, That is true, an excerpt from Doug s email; ... but, since I don t use OO I had to develop the clip using Word. I was waiting for him to
                    Message 9 of 26 , May 28, 2006
                    • 0 Attachment
                      rpdooling wrote:
                      >>> Don't give up yet, I'm working on a clip, using Word,
                      >
                      > HRS,
                      >
                      > I thought he said that he doesn't have a copy of Word. He has Open
                      Office.
                      >
                      > rick

                      Rick,

                      That is true, an excerpt from Doug's email;

                      > I don't have and version of word running on my computer. I use
                      > openoffice to view the .doc files. and convert them one at a time.

                      but, since I don't use OO I had to develop the clip using Word. I was
                      waiting for him to answer since the clip is complete, for Word at least.

                      I'm hoping it's just a matter of altering the ^!Keyboard strings to
                      adapt it for OpenOffice.

                      The clip allows you to choose the source folder/files and the
                      destination folder for the text files after conversion. I think it
                      should work well, it does with Word.

                      ºvº
                      06.05.28_16.09
                      "Man Management;
                      Discover How Minor Household Chores
                      Can Wait until after the game."
                      hrs ø hsavage@...
                    • hsavage
                      ... I know less about Python and Perl than I knew about NoteTabs regex. Since Doug already has NoteTab it seems a clip would offer the flattest learning curve
                      Message 10 of 26 , May 28, 2006
                      • 0 Attachment
                        rpdooling wrote:
                        >>> I think there's Perl modules for the task
                        >
                        > And several Python scripts. I have one I adapted from the Python
                        > Cookbook, or this one is popular:
                        >
                        > http://www.freewisdom.org/projects/python-markdown/odt2txt.php
                        >
                        > You can install Python in about four minutes, using these instructions:
                        >
                        > http://www.richarddooling.com/index.php/category/geekophilia
                        >
                        > rick

                        I know less about Python and Perl than I knew about NoteTabs regex.
                        Since Doug already has NoteTab it seems a clip would offer the flattest
                        learning curve for something you probably won't be using at an
                        industrial pace.

                        ºvº
                        06.05.28_16.09
                        "Man Management;
                        Discover How Minor Household Chores
                        Can Wait until after the game."
                        hrs ø hsavage@...
                      • rpdooling
                        hrs, ... I don t use OO that much, but I have it on another machine. The keyboard commands look the same Ctrl+O to open file, Ctrl+S to save etc. Quite a
                        Message 11 of 26 , May 28, 2006
                        • 0 Attachment
                          hrs,

                          >> I'm hoping it's just a matter of altering the ^!Keyboard strings to
                          >> adapt it for OpenOffice.

                          I don't use OO that much, but I have it on another machine. The
                          keyboard commands look the same Ctrl+O to open file, Ctrl+S to save
                          etc. Quite a laundry list of "Save As" file types, along with plain
                          text .txt

                          Looks like it would work similar to Word. I'll be interested to see
                          the clip. Can it do batches? That's the main attraction of the macros
                          and scripts I've seen is that they will do an entire directory of .doc
                          files.

                          Thanks,

                          rick
                        • Jeff Scism
                          I for 1, am interested in the Word version, but I also run Open Office. ~~ Jeffery Scism, USGenWeb Project Local Coordinator Rep NC/NE region
                          Message 12 of 26 , May 28, 2006
                          • 0 Attachment
                            I for 1, am interested in the Word version, but I also run Open Office.

                            ~~

                            Jeffery Scism,
                            USGenWeb Project Local Coordinator Rep
                            NC/NE region




                            hsavage wrote:

                            >rpdooling wrote:
                            > >>> Don't give up yet, I'm working on a clip, using Word,
                            > >
                            > > HRS,
                            > >
                            > > I thought he said that he doesn't have a copy of Word. He has Open
                            >Office.
                            > >
                            > > rick
                            >
                            >Rick,
                            >
                            >That is true, an excerpt from Doug's email;
                            >
                            > > I don't have and version of word running on my computer. I use
                            > > openoffice to view the .doc files. and convert them one at a time.
                            >
                            >but, since I don't use OO I had to develop the clip using Word. I was
                            >waiting for him to answer since the clip is complete, for Word at least.
                            >
                            >I'm hoping it's just a matter of altering the ^!Keyboard strings to
                            >adapt it for OpenOffice.
                            >
                            >The clip allows you to choose the source folder/files and the
                            >destination folder for the text files after conversion. I think it
                            >should work well, it does with Word.
                            >
                            > ºvº
                            > 06.05.28_16.09
                            > "Man Management;
                            > Discover How Minor Household Chores
                            > Can Wait until after the game."
                            > hrs ø hsavage@...
                            >
                            >
                            >
                            >
                            >
                            >
                            >Fookes Software: http://www.fookes.us, http://www.fookes.com
                            >Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                            >
                            >Yahoo! Groups Links
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                            >
                          • Doug Offen
                            ... Thanks for all the pointers. It will take a while to wade through them. For now it seems the easiest way is to load the doc files into notetab and rename
                            Message 13 of 26 , May 29, 2006
                            • 0 Attachment
                              --- In ntb-clips@yahoogroups.com, "Doug Offen" <yahoo@...> wrote:
                              >
                              > I am wishing to convert a bunch of *.doc files to *.txt files to use
                              > in notetab.
                              >
                              Thanks for all the pointers.

                              It will take a while to wade through them. For now it seems the
                              easiest way is to load the doc files into notetab and rename it as a
                              txt file take off the word wrap and manually remove the junk at the
                              start and the end. and resave.

                              The code at the beginning and end is random in size and content. Up
                              until I started working on the convertions I thouhjy notetab would
                              open the docs and the whole thing was junk code. But by accidently
                              scrolling down I found the core text was there so the quest for an
                              easy clip to extract the text or delete the leading and trailing
                              garbage began. It isn't easy, so back to the old highlight and delete.

                              Thanks again for your help. This is a very generous forum. If I get
                              something that works I'll be sure to post it.

                              Doug Offen
                            • Jeff Scism
                              It seems that there would be a code in the scrambled block that indicates the text start point. If you can determine that and select from there to the
                              Message 14 of 26 , May 29, 2006
                              • 0 Attachment
                                It seems that there would be a code in the scrambled block that
                                indicates the text start point. If you can determine that and select
                                from there to the beginning and delete the block that should bring the
                                text block to the top of the doc, and perhaps the complimentary process
                                can be done to the ending codes?

                                My approach ( not that I am able to implement it, yet) would be to
                                focus on the word doc, Copy all, refocus on NoteTab, Paste and that
                                should bring the TEXT to NoteTab ( it ignores all the non-text).

                                There is a directory search method for getting all docs from a directory.

                                It should be relatively simple to serially process them.

                                get directory doc files,
                                focus the first,
                                copy all ( Ctrl+A, Ctrl+C),
                                focus Notetab,
                                New Doc, paste Clipboard (Ctrl+N, Ctrl+V),
                                Open next DOC, loop until no more Docs to "get".

                                This should leave you with a group of unsaved open NoteTab documents
                                with the text from each Word file processed. (and no JUNK code).

                                (as a note I find that there are some texts when copied to the clipboard
                                from some applications which will not paste to Notetab, but if pasted to
                                Word can be copied FROM word back to the clipboard, and then pasted into
                                NoteTab.- So I manually do that one a lot)( It also irritates me that
                                when word is opened it doesn't acknowledge what is already on the
                                clipboard, you have to go back after word is opened and recopy to the
                                clipboard THEN you can paste to Word...)



                                ~~

                                Jeffery Scism,
                                USGenWeb Project Local Coordinator Rep
                                NC/NE region




                                Doug Often wrote:

                                >--- In ntb-clips@yahoogroups.com, "Doug Offen" <yahoo@...> wrote:
                                >
                                >
                                >>I am wishing to convert a bunch of *.doc files to *.txt files to use
                                >>in notetab.
                                >>
                                >>
                                >>
                                >Thanks for all the pointers.
                                >
                                >It will take a while to wade through them. For now it seems the
                                >easiest way is to load the doc files into notetab and rename it as a
                                >txt file take off the word wrap and manually remove the junk at the
                                >start and the end. and resave.
                                >
                                >The code at the beginning and end is random in size and content. Up
                                >until I started working on the convertions I thouhjy notetab would
                                >open the docs and the whole thing was junk code. But by accidently
                                >scrolling down I found the core text was there so the quest for an
                                >easy clip to extract the text or delete the leading and trailing
                                >garbage began. It isn't easy, so back to the old highlight and delete.
                                >
                                >Thanks again for your help. This is a very generous forum. If I get
                                >something that works I'll be sure to post it.
                                >
                                >Doug Offen
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >Fookes Software: http://www.fookes.us, http://www.fookes.com
                                >Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                                >
                                >Yahoo! Groups Links
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                                >
                              • Jeff Kenton
                                I have not been meticulously watching this thread, but I did want to offer one caution with .doc files. If the user has autosave turned on, the text can be
                                Message 15 of 26 , May 29, 2006
                                • 0 Attachment
                                  I have not been meticulously watching this thread, but I did want to offer
                                  one caution with .doc files.

                                  If the user has autosave turned on, the text can be significantly jumbled,
                                  because MS word appends autosave changes, rather than saving the entire
                                  file.

                                  After the file gets above a certain size, the autosave behavior changes to
                                  actually save the entire file from start to end. The old limit was 32k of
                                  text, but it might be different now.

                                  The practical implication is that all of the text is together, but it may be
                                  severely disorganized.

                                  HTH,

                                  Jeff

                                  On 5/29/06, Doug Offen <yahoo@...> wrote:
                                  >
                                  > --- In ntb-clips@yahoogroups.com<https://mail.google.com/mail?view=cm&tf=0&to=ntb-clips@yahoogroups.com>,
                                  > "Doug Offen" <yahoo@...> wrote:
                                  > >
                                  > > I am wishing to convert a bunch of *.doc files to *.txt files to use
                                  > > in notetab.
                                  > >
                                  > Thanks for all the pointers.
                                  >
                                  > It will take a while to wade through them. For now it seems the
                                  > easiest way is to load the doc files into notetab and rename it as a
                                  > txt file take off the word wrap and manually remove the junk at the
                                  > start and the end. and resave.
                                  >
                                  > The code at the beginning and end is random in size and content. Up
                                  > until I started working on the convertions I thouhjy notetab would
                                  > open the docs and the whole thing was junk code. But by accidently
                                  > scrolling down I found the core text was there so the quest for an
                                  > easy clip to extract the text or delete the leading and trailing
                                  > garbage began. It isn't easy, so back to the old highlight and delete.
                                  >
                                  > Thanks again for your help. This is a very generous forum. If I get
                                  > something that works I'll be sure to post it.
                                  >
                                  > Doug Offen
                                  >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  >
                                  > Fookes Software: http://www.fookes.us, http://www.fookes.com
                                  > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                                  >
                                  >
                                  >
                                  >
                                  > SPONSORED LINKS
                                  > Affiliate program software<http://groups.yahoo.com/gads?t=ms&k=Affiliate+program+software&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=9KaWuy6FKnRHLoW5F2y04Q> Construction
                                  > software program<http://groups.yahoo.com/gads?t=ms&k=Construction+software+program&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=F3LkPjhe1MkJ4Fq3QQZwUA> Medical
                                  > software program<http://groups.yahoo.com/gads?t=ms&k=Medical+software+program&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=AwyI7nQBuf_OuJksGRgsXA> Accounting
                                  > software program<http://groups.yahoo.com/gads?t=ms&k=Accounting+software+program&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=VzCxLFHTZiHmXsWEP_djZQ> Estate
                                  > program real software<http://groups.yahoo.com/gads?t=ms&k=Estate+program+real+software&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=lMTrEr4oqbyRycvw8--w5g> Software
                                  > development program<http://groups.yahoo.com/gads?t=ms&k=Software+development+program&w1=Affiliate+program+software&w2=Construction+software+program&w3=Medical+software+program&w4=Accounting+software+program&w5=Estate+program+real+software&w6=Software+development+program&c=6&s=198&.sig=DOR5xh8pu5s-DHxW2MQDrA>
                                  > ------------------------------
                                  > YAHOO! GROUPS LINKS
                                  >
                                  >
                                  > - Visit your group "ntb-clips<http://groups.yahoo.com/group/ntb-clips>"
                                  > on the web.
                                  >
                                  > - To unsubscribe from this group, send an email to:
                                  > ntb-clips-unsubscribe@yahoogroups.com<https://mail.google.com/mail?view=cm&tf=0&to=ntb-clips-unsubscribe@yahoogroups.com&su=Unsubscribe>
                                  >
                                  > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                                  > Service <http://docs.yahoo.com/info/terms/>.
                                  >
                                  >
                                  > ------------------------------
                                  >



                                  --
                                  A human being has a natural desire to have more of a good thing than he
                                  needs.
                                  -- Mark Twain


                                  [Non-text portions of this message have been removed]
                                • hsavage
                                  ... Rick, Jeffery, I broke down, downloaded and installed OpenOffice. Now trying to alter the clip to work dependably in OO . It is proving to be slightly
                                  Message 16 of 26 , May 29, 2006
                                  • 0 Attachment
                                    Jeff Scism wrote:
                                    > I for 1, am interested in the Word version, but I also run Open Office.
                                    >
                                    > Jeffery Scism,
                                    >
                                    >> rpdooling wrote:
                                    >
                                    > I don't use OO that much, but I have it on another machine. The
                                    > keyboard commands look the same Ctrl+O to open file, Ctrl+S to save
                                    > etc. Quite a laundry list of "Save As" file types, along with plain
                                    > text .txt
                                    >
                                    > Looks like it would work similar to Word. I'll be interested to see
                                    > the clip. Can it do batches? That's the main attraction of the macros
                                    > and scripts I've seen is that they will do an entire directory of .doc
                                    > files.
                                    >
                                    > Thanks,
                                    >
                                    > rick

                                    >> HRS,
                                    >>
                                    >> I'm hoping it's just a matter of altering the ^!Keyboard strings to
                                    >> adapt it for OpenOffice.
                                    >>
                                    >> The clip allows you to choose the source folder/files and the
                                    >> destination folder for the text files after conversion. I think it
                                    >> should work well, it does with Word.

                                    Rick, Jeffery,

                                    I broke down, downloaded and installed OpenOffice. Now trying to alter
                                    the clip to work dependably in 'OO'. It is proving to be slightly
                                    problematic, much different program/event timing between Word and OO.

                                    I'll paste the clip for Word below so, if you have Word you can try it,
                                    if you don't have Word, you can at least study the method.

                                    In the first version I did copy/save with Word just as a user might. In
                                    the second version, much faster, which is below, clip steps follow,
                                    start when Word is loaded.

                                    Alt+F O -open/load docfile from previously built array
                                    Ctrl+O may be a better choice.
                                    Control A -to select ALL
                                    Control C -copy to clipboard
                                    Alt+F C -close document
                                    ^!TextToFile to send clipboard text to samename.txt file in destination.
                                    Loop for next selected file

                                    This works fine on my computer, others may have to play with the
                                    keyboard delays, depending on the individual machine. All delays could
                                    be increased to insure the clip will work on anything but, I was going
                                    for dependability plus speed.

                                    In this clip I purposely broke the '^!Set %src_path%=' line into
                                    increments to prevent wrapping in email.

                                    By removing the ‡^p‡, remove symbols and carriage return that separates
                                    them and you will end up with the complete line. This is the wizard that
                                    allows path variables and other selections to be set.

                                    Important. Before running the clip you will probably want to edit your
                                    Word path if different from '^!Set %word%=', and the '%dst_path%' will
                                    probably need changing. You may also set 'src and dst' as you run the
                                    clip also.

                                    <>·······Start Clip·······<>
                                    H="Clipboard Word Doc-2-Txt"
                                    ;_ Modified-Updated~Created_20060528
                                    ;_ hrs ø hsavage·pobox·com_08:12:19a
                                    ^!ClearVariables
                                    ^!SetWordWrap 0
                                    ^!SetListDelimiter |
                                    ;
                                    ^!Set %src_path%="^?{(T=D)Set DOC-2-TXT Conversion Source_Folder=‡
                                    ‡^$GetShellFolder(Personal)$}"; %dst_path%="^?{(T=D)Set DOC-2-TXT Co‡
                                    ‡nversion Destination_Folder=C:\+r2rweb\lists\}"; %sub%=^?{Show Fi‡
                                    ‡les in Subfolders==YES^=+|_NO^=^%empty%}; %sel%=^?{Show Files in Se‡
                                    ‡lected State==YES^=_|_NO^=^%empty%}
                                    ;
                                    ^!Set %files%=^$GetFiles("^%sub%^%src_path%";"*.doc;*.txt";name)$
                                    ^!If ^%files%=^%EMPTY% END
                                    ^!Set %files%=^$StrReplace("^%src_path%";^%sel%;^%files%;0;0)$
                                    ^!SetArray %files%=^?{(H=26;T=A)Doc Files To Convert!==^%files%}
                                    ^!Set %loop%=0; %count%=^%files0%
                                    ;
                                    ^!Set %word%="C:\Program Files\Microsoft Office\Office\winword.exe"
                                    ; checks if Word is open, and, if not, opens it
                                    ^!IfAppOpen Microsoft Word* NEXT ELSE ^!Shell "^%word%"
                                    ^!Delay 3
                                    ^!SetScreenUpdate 0
                                    ;^!FocusApp Microsoft Word*
                                    :LOOP
                                    ^!Inc %loop%
                                    ; opens file in Word
                                    ^!Keyboard Alt+F O &100 #"^%src_path%^%files^%loop%%"# &50 ENTER
                                    ; selects and saves text to clipboard and closes file
                                    ^!Keyboard Ctrl+A &50 Ctrl+C &50 Alt+F C
                                    ; sends the clipboard text to a file in the pre-chosen destination
                                    ^!TextToFile "^%dst_path%^$GetName(^%files^%loop%%)$.txt" ^$GetClipboard$
                                    ; loops back for next file
                                    ^!If ^%loop% < ^%count% LOOP
                                    <>········End Clip········<>

                                    ºvº
                                    06.05.29_11.25
                                    -Newspaper HeadLine...
                                    "Man Struck by Lightning Faces Battery Charge"
                                    hrs ø hsavage@...
                                  • rpdooling
                                    ... Doug, This is not the easiest way; it is the laziest way. What you are trying to do: batch convert documents to text is a common thing for a programmer
                                    Message 17 of 26 , May 29, 2006
                                    • 0 Attachment
                                      >> For now it seems the easiest way is to load
                                      >> the doc files into notetab and rename it as a
                                      >> txt file take off the word wrap and manually
                                      >> remove the junk at the start
                                      >> and the end. and resave.

                                      Doug,

                                      This is not the 'easiest' way; it is the laziest way. What you are
                                      trying to do: batch convert documents to text is a common thing for a
                                      programmer to want to do. That's why you've had so many responses
                                      here. If you're talking about three files, then by all means, go ahead
                                      and do it manually. But if you're talking about 300 files, I would
                                      find a script or clip to get the job done. Trust me, you'll use it again.

                                      I would bet my money on the Open Office macros that several have
                                      pointed you to. OO knows its own file formats and it knows how to save
                                      them as txt files. You just need to automate that procedure. It's such
                                      a common desire that even M$ gives away the macro to get it done in
                                      Word, so there must be an OO equivalent.

                                      Do let us know as there are plenty of people here who use OO.

                                      rd
                                    • dave
                                      Hi Have you tried saving them as txt files in word because I tried a whatsnew.doc in wordpad (308k) saved as txt and the file drops to 3k and no crap ??
                                      Message 18 of 26 , May 30, 2006
                                      • 0 Attachment
                                        Hi
                                        Have you tried saving them as txt files in word because I tried a
                                        whatsnew.doc in wordpad (308k) saved as txt and the file drops to 3k and no
                                        crap ??
                                        THANKYOU DAVE M

                                        ----- Original Message -----
                                        From: "Doug Offen" <yahoo@...>
                                        To: <ntb-clips@yahoogroups.com>
                                        Sent: Monday, May 29, 2006 11:24 PM
                                        Subject: [Clip] Re: Are there any clips to covert .doc to .txt?


                                        > --- In ntb-clips@yahoogroups.com, "Doug Offen" <yahoo@...> wrote:
                                        >>
                                        >> I am wishing to convert a bunch of *.doc files to *.txt files to use
                                        >> in notetab.
                                        >>
                                        > Thanks for all the pointers.
                                        >
                                        > It will take a while to wade through them. For now it seems the
                                        > easiest way is to load the doc files into notetab and rename it as a
                                        > txt file take off the word wrap and manually remove the junk at the
                                        > start and the end. and resave.
                                        >
                                        > The code at the beginning and end is random in size and content. Up
                                        > until I started working on the convertions I thouhjy notetab would
                                        > open the docs and the whole thing was junk code. But by accidently
                                        > scrolling down I found the core text was there so the quest for an
                                        > easy clip to extract the text or delete the leading and trailing
                                        > garbage began. It isn't easy, so back to the old highlight and delete.
                                        >
                                        > Thanks again for your help. This is a very generous forum. If I get
                                        > something that works I'll be sure to post it.
                                        >
                                        > Doug Offen
                                        >
                                        >
                                        >
                                        >
                                        >
                                        >
                                        >
                                        > Fookes Software: http://www.fookes.us, http://www.fookes.com
                                        > Fookes Software Mailing Lists: http://www.fookes.us/maillist.htm
                                        >
                                        > Yahoo! Groups Links
                                        >
                                        >
                                        >
                                        >
                                        >
                                        >
                                        >
                                      Your message has been successfully submitted and would be delivered to recipients shortly.