If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
I have found a minor bug in the add-in whilst testing, now fixed and updated
on the web site. It shouldn't affect the process, but I took the opportunity to remove some superfluous code. It seems reliable even running it on my full C drive of 200 gb without drama! If it works for you, let me know and I'll post a permanent link on my web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jeffrey L. Hook wrote: Once again, Graham, thank you very much for your attention to this topic! (I'm sure many other users will appreciate this also because, as I reported at the start of this thread, I looked around extensively and I couldn't find any instructions about how to achieve this result but I'm sure many users wish to make such mass or batch conversions.) I should clarify that I didn't think would be "simple to execute"! With *NO* abilities of my own in this area at all, I don't regard *any* of this as simple! I'll download the code from your site and I'll also check Greg Maxey's user-defined batch code. This will help me learn about batch programs. My data directory occupies its own partition of c. 32.25 GB on one of my two internal hard drives but, as I explained, it's extensively branched, with more than 52K folders and 94K files. I'll want to back up my entire data directory first and I'll then try your code on a few sub-directories before I "let it rip" from the root. Yes, I fully understand that I'll use this code at my own risk and without any recourse to you. I'll let you know how this works out. Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... The advantage of the macro I posted, over yours, was that mine runs on a complete folder, whereas yours runs on a single file. If your files are not scattered haphazardly over the hard drive, then the documents will be in a limited number of places which should be easy to identify. Unfortunately what you propose is not quite as simple to execute as you imagine. However true to my word, I have investigated further and I have located a procedure which I believe will do what you propose. As it is somewhat complex, I have decided not to post the code here, but have incorporated it as an add-in for Word 2007. You can download it from my web site via the following link. http://www.gmayor.com/Extras/WorksConverter.dotm Save to the Word startup folder as defined at Word Options Advanced File locations Startup (by default - C:\Documents and Settings\%username%\Application Data\Microsoft\Word\STARTUP) and it will load with Word When loaded it puts a button on the Developer Tab of the ribbon (Convert Works WPS format). If the developer tab is not displayed add it from Word Options Popular. I have tested it with a limited number of wps files and it will convert them to docx in the manner already discussed. It will also access the sub folders under the folder you select from the initial dialog when the macro is run. However, searching for 20k files across a complete hard drive is uncharted waters and not something I have been able to test. However you may set the folder to search from as the root of the drive and it will search the whole drive. While running, it may blank the Word screen, and when run on a large drive it will take some time to find the files in question, let alone process them. When finished it will return to the Word screen, with no document open, at the Home tab. I offer the add-in 'as seen' and accept no responsibility for any problems that you may encounter when running it. Fellow MVP Greg Maxey has a different function available on his web site - http://gregmaxey.mvps.org/Process_Batch_Folder.htm which has a 'User Defined' process option that could be modified to convert the files, should you wish to investigate another approach. |
#12
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
Graham: I'll comment about three topics in this message. I'll number them for your reference in case you wish to scroll right through my typical "overkill" from one topic to another: 1. THANKS UPON THANKS I can't thank you enough for your sustained attention to this topic. Please realize that I *greatly* appreciate your assistance. I see from your comments on your home page that you're a Usenet "true believer" and I'm therefore confident that you agree with me about the value of providing this type of guidance for the use of *everyone* in the entire *global* community! I'm sure that this one effort will help unseen users for years and this one "transaction" is only one of many to which you've contributed. That's why you were designated as an MVP in the first place and that's why you've *remained* an MVP, one year at a time! 2. UNABLE TO OBTAIN CODE I'm happy to see that you've altered the code since you first reported its availability, because I've not yet been able to obtain it. I'll therefore obtain the updated version when I finally succeed. You can probably see from the differences in our respective local times that I was up late last night. (I'm in the NYC area on the US east coast.) I'll not be able to "dig in" to this effort immediately and I'll want to perform system maintenance first, including a data directory back-up, which will take some time, so I'll need to catch up with you later, but I thought I'd let you know now what happens when I try to obtain the code. Let me say at the outset that these problems *may* result from some "excess of caution" by my browser, IE7, but I've *not* been shown any security warnings or other explanations. When I attempt to use this URL in your prior message: ...As it is somewhat complex, I have decided not to post the code here, but have incorporated it as an add-in for Word 2007. You can download it from my web site via the following link. http://www.gmayor.com/Extras/WorksConverter.dotm ... I'm shown the usual "File not found" error page: +++ The page cannot be found The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. -------------------------------------------------------------------------------- Please try the following: a.. Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. b.. If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted. c.. Click the Back button to try another link. HTTP Error 404 - File or directory not found. Internet Information Services (IIS) +++ Notice I'm not told that access to the page has been blocked for security reasons or for other purposes. The message seems only to suggest that the desired content can't be found. I select, copy, and paste your file name: WorksConverter.dotm into the Google Site Search data-entry field at your home page, and I'm told: +++ Your search - WorksConverter.dotm - did not match any documents. +++ I remove the file extension from the file name, I try the search again, and I'm taken to: http://www.google.com/custom?hl=en&s...w.gmay or.com where I'm told: +++ No standard web pages containing all your search terms were found. Your search - WorksConverter - did not match any documents. +++ but I'm asked: +++ Did you mean: Works Converter +++ (Note the space which has been included between the two words.) I exploit that hyperlinked Google Search suggestion and I'm taken to: http://www.google.com/custom?hl=en&s...verter&spell=1 where I'm shown: +++ a.. Downloadable files Add filters for a variety of applications. WordStar (for DOS) converter for Word - 117kb. Works converters for Word - 186kb ... www.gmayor.com/downloads.htm - Similar pages a.. What's New? Added the Microsoft Works and Word Perfect text converters to the downloads page and a couple of extra new house photos. Some changes to the layout of the ... www.gmayor.com/Whats_New.htm - Similar pages a.. Copy Vinyl or Tape Recordings to CDR ... signal to the sound card on the PC and its analogue to digital converter. ... The Shure cartridge works fine in the SME arm and the arm works well with ... www.gmayor.com/copy_vinyl_to_CDR.htm - Similar pages a.. Microsoft Word Tips File converter dialog shows garbage when opening documents in Word ..... This is due to a bug in the Works add-in. This page explains how to deal with it. ... www.gmayor.com/Word_pages.htm - Similar pages +++ I don't see the "Extras" page at your site which is named in the full file path in the URL which you provided for the code but, on the Downloads page, at: http://www.gmayor.com/downloads.htm I do see that this Works item is the last citation in the File converter downloads list. That suggests this is the most recent offering and that it *may* be the item you're referring to: +++ Works converters for Word - 186kb +++ I downloaded that item. It's a WinZip archive which includes: +++ 4 CNV files, modified on 6-20-02 and 6-16-03 1 REG file, modified on 11-17-04 1 Read Me TXT file, also modified on 11-17-04 +++ This is the complete text of the 187 byte Read Me file: +++ Extract the cnv files to the folder C:\Program Files\Common Files\Microsoft Shared\TextConv and merge the reg file into the registry (right click in Windows Explorer and select 'merge') +++ The modification dates suggest that I've not obtained the Works converter you offered to me. Am I correct? 3. BASIC MACRO QUESTIONS WHICH YOU *MAY* WISH TO ANSWER I've admitted that I'm completely new to macros and to Visual Basic. I don't claim to have any understanding of either topic. Your statement that your new macro/add-in is "complex" gives me some pause, as does the reference to the Registry in the above-mentioned Works converter, which may or may not be the new item which you're offering for my use now. I previously showed you the complete text of my own supposed "Convert-Save-Close" macro. I'll include it again in this message, below. It's the first functional macro I've ever created, in Word 2007 or in any other application. I followed the Windows 2007 Help instructions about how to "Record a Macro" but my initial efforts weren't successful; I didn't record any code on my first attempt and my second macro wouldn't "run." I used the Edit interface from the Macro menu on the Developer tool bar or ribbon or tab or whatever it's called, and I could see that the code which had been written for my failed second attempt included several lines which seemed to refer to the "Save As" option. I didn't copy any of the Visual Basic (?) text from the Edit interface, but I did take some screen shots of it, and I extracted the Plain Text which I show below from one of those images, by using OCR. I ran through the process of opening, converting, saving, and then closing four consecutive files from my desktop search engine's list of WPS files, which began at the root of my data directory. I assumed I was "showing the macro recorder" what I wanted the macro to do. I hoped the macro-recording capability would function like a "keylogger," and I hoped this would allow the macro to be able to repeat what I'd done, automatically, although I was skeptical, because this seemed far too much to ask of such a simple "program." I realized I'd not given the macro any instructions about how to operate the desktop search engine, about how to obtain a list of all WPS in a directory, about how to move through such a list, etc. Nonetheless, I hoped the macro would be able to operate automatically, as I've discussed with you. I hoped it would be able to "run through" the search engine's list of WPS files, opening each file in succession, converting each file from Works 7.0 to Word 2007, saving the file, closing the file, returning to the search engine list for the next file, and repeating the process until all of the files in the list had been converted, so that's what I "demonstrated" for the macro, "manually." I'm sure it'll amuse you that, in my absolute ignorance, I "demonstrated" this process for the macro recorded four times, "just to be sure" that the recorder could see what I'd done... The code began this way, for the first of the four "demonstrations" of what I wanted the macro to do: +++ Sub Macro2() ' ' Macro2 Macro ' Automatically locates and then converts all extant Works "word processing" files to Word 2007. ' ActiveDocument.Convert ActiveDocument.SaveAs FileName:= _ "(The full file path and file names of the four files which I converted "for the benefit of the macro" were each indicated here, inside this set of quotation marks, with one such entry of this type for each of the four files, each with a DOCX extension.)" FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", _ AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _ EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _ :=False, SaveAsAOCELetter:=False ActiveDocument.Save ActiveWindow.Close ActiveDocument.Convert ActiveDocument.SaveAs FileName:=... +++ That type of code was recorded for each of the four "demonstrations" and then the code ended this way. (I've included the last two lines of the fourth of the four "entries," plus the last line of code): +++ ...ActiveDocument.Save ActiveWindow.Close End Sub +++ I never expected this would work, and I wasn't surprised when this code "didn't run" when I tried to operate it via its new control button on the Word 2007 Quick Access Toolbar of any WPS file which was opened in Word 2007. I noticed the reference to the "Save As" dialog in the unsuccessful code. I assumed that reference could be causing the macro to "fixate" on the specific full file paths and file names of the four files which had already been converted. I assumed that alone could disable the macro and I didn't want to use the "Save As" option anyway; I wanted to use the "Convert" option, then the "Save" option, rather than the "Save As" option. So, in my blissfully ignorant way, I simply used basic word processing techniques to select all code other than what *seemed* to be references to the desired "controls," I deleted my selection, and I was left with this (which includes my rewritten "description" in the apparent "Comment" code, at the start. I'd assumed that the macro itself wouldn't be able to open and then convert, save, and close an endless series of files in the search engine's list automatically, as I'd hoped, I assumed it would be necessary for me to run the macro "manually" from each file's Quick Access Toolbar once I'd "manually opened" each file, and I re-wrote the "description" on the basis of that assumption): +++ Sub Macro3() ' ' Macro3 ' Automates the steps of the Conversion process within a Works 7.0 "word processing" file which has already been opened in Word 2007. ' ActiveDocument.Convert ActiveDocument.Save ActiveWindow.Close End Sub +++ (I reported this code in this thread previously.) I nearly "fell off my desk chair" when, to my great surprise, that puny little "macro" actually WORKED! I'm now wondering: A. Is such "skimpy" code potentially problematical? It does *seem* to achieve the desired results even if, as you pointed out, it must be operated manually in each file, "one-by-one." It's not able to run automatically, as I'd hoped it would. Am I "living in a fool's paradise" because I'm building up greater and greater potential for future problem on some "future day of reckoning" the more I use such "stripped-down" code? Did I remove critical code from this "skeletal" macro? B. If my minimal code is "OK," then is it possible to achieve more complex results (such as the automatic operation which we've been discussing, in all sub-folders of directories) with code which isn't much more complicated, or do I demonstrate my "blissful ignorance" by asking such a stupid question? My "real or imagined macro" does at least *seem* to be working, and, as I say, it consists only of the apparent "operative" elements: the "controls" themselves, or at least "coded references" to the controls. I'm not even attempting to question your statement that your code is much more complex. I assume that may indeed be required, but I'm wondering about the Registry and about other "deep" features which might cause problems. I stress my appreciation of all you've done so far and I'm not asking you to answer these questions unless they interest you! THANKS AGAIN, Graham! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... I have found a minor bug in the add-in whilst testing, now fixed and updated on the web site. It shouldn't affect the process, but I took the opportunity to remove some superfluous code. It seems reliable even running it on my full C drive of 200 gb without drama! If it works for you, let me know and I'll post a permanent link on my web site. (snipped) |
#13
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
Jeffrey L. Hook wrote:
Graham: 1. THANKS UPON THANKS You are welcome 2. UNABLE TO OBTAIN CODE As dotm files may be used to carry malicious code, I suspect it may have been blocked by Windows security. I have compressed the file to zip format and re-added it to the web site. I have checked this new link and it works from here - http://www.gmayor.com/Zips/WorksConverter.zip. Extract the file from the zip to the Word startup folder. The zip file is NOT linked to my web site. The only link is that in this message. 3. BASIC MACRO QUESTIONS WHICH YOU *MAY* WISH TO ANSWER You are not a man of few words The macro is complex in that it uses several functions in different modules, that make providing an add-in a lot less effort than reproducing it in a text message with explanations on how to apply it. The code is not protected if you wish to open the template in Word and examine it. It is based on code from http://www.vbaexpress.com/kb/getarticle.php?kb_id=246 and http://www.vbaexpress.com/kb/getarticle.php?kb_id=245 Simply click the button on the developer toolbar and select a start folder. The macro will run from that start location, its sub folders and their sub folders. Start with a sample folder low down the directory tree if you wish. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org |
#14
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
The following was lost in the fog
Jeffrey L. Hook wrote: I'm now wondering: A. Is such "skimpy" code potentially problematical? It does *seem* to achieve the desired results even if, as you pointed out, it must be operated manually in each file, "one-by-one." It's not able to run automatically, as I'd hoped it would. Am I "living in a fool's paradise" because I'm building up greater and greater potential for future problem on some "future day of reckoning" the more I use such "stripped-down" code? Did I remove critical code from this "skeletal" macro? Your last effort is a perfectly viable macro. It provides a simple series of functions which it achieves. That is all a macro is required to do - process functions to save manual effort. The complexity arrives when the functions you want to process are not so simple, when there are alternatives to consider or potential errors to account for. B. If my minimal code is "OK," then is it possible to achieve more complex results (such as the automatic operation which we've been discussing, in all sub-folders of directories) with code which isn't much more complicated, or do I demonstrate my "blissful ignorance" by asking such a stupid question? The core of the code (your macro) is simple enough. My earlier macros demonstrated how to process the current folder. It is the processing of all the potential sub folders that is more complicated My "real or imagined macro" does at least *seem* to be working, and, as I say, it consists only of the apparent "operative" elements: the "controls" themselves, or at least "coded references" to the controls. I'm not even attempting to question your statement that your code is much more complex. I assume that may indeed be required, but I'm wondering about the Registry and about other "deep" features which might cause problems. The macros (yours and mine) do not write to the registry. It is possible to write to the registry from a macro (there are examples on my web site) but that is something to leave until you are more proficient with vba and the potential consequences of what you are doing. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org |
#15
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
Graham, "you are a gentleman and a scholar." With respect to your accurate observation that You are not a man of few words and your wry comment that The following was lost in the fog I must thank you for stating the problem diplomatically. My intentions are good, but my "unstinting" efforts are often pretty pathological. I may be in the terminal stages of a case of acute obsessive-compulsive disorder. It drives me to be sure that I've "covered" everything and the resulting excessiveness so powerfully annoys most people that I'm all the more appreciative of your willingness to "hang in here" and to stay with this thread. Lesser men would have given up on this long ago. "Hey MVP Certification Committee! Are you *reading* this? Has this guy EARNED a 'distinguished service' award, or *WHAT*?!" Thanks for clarifying in your last message that your code wasn't linked to your Web site. I could have provided far less information about my inability to obtain the code, but I wanted you to have the texts of the error messages, etc. You'll look around for something hard which you can throw at my head when I say this, but it's almost "fun" to see how much I can "pack in" to an unformatted Plain Text message by using "text dividers," like this: +++ +++ by numbering and capitalizing "topic headings," and by moving some content below my signature as "optional" text. (The below-the-signature-gambit may be "the last resort of a scoundrel," to paraphrase Dr. Johnson.) These tactics may preserve legibility, just barely, but, as you point out, overloading messages does create "fog." It also provokes "extreme reader resentment"... I have obtained your code. I'm delighted that you not only created a tool for my use (and, of course, for the use of hundreds of other "unseen" users who'll benefit from your macro in the future) but that you explained the code and that you also answered my questions so responsively and so thoughtfully. You've done all the work but I'm going to give myself some time off today. I'll proceed anon as I explained previously. Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... The following was lost in the fog (snipped) |
#16
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
Graham: I've tested your macro. The macro seemed to work well. Its icon button was displayed on the Developer ribbon when the DOTM file was opened directly from within the WinZip archive and I thought I could run the macro there if I could see it. When I clicked the macro's button I was shown the "Browse" dialogue, I selected the desired starting folder, and I clicked the "OK" button but the macro wouldn't run until I'd extracted it to the Word\STARTUP system folder which you identified. I tested the macro on a "straight copy" of my entire data directory which I'd pasted to an external USB2 hard drive on February 8th of this year. (That content had simply been copied via the Windows Explorer Edit\Copy and Edit\Paste menus from the data partition of one of the two internal hard drives to the data backup partition of the external hard drive.) The USB connection may have slowed the macro down but the speed seemed to be pretty good. I assume the macro may operate more quickly in the current directory on the internal hard drive. The macro didn't blacken the screen. It seemed to close all Word 2007 files which had been open when I ran it, asking me if I wished to save any unsaved changes, and closing without comment files which had no unsaved changes. It then operated "under cover of" the apparent "basic GUI" of the Word 2007 executable, the standard Word 2007 interface which was identified as Microsoft Word non-commercial use on its Title Bar. Text along the bottom of the Word GUI identified the files and indicated whether they were being converted or saved. The macro did "drill down" along file paths, through sub-directories. The only problem resulted not from any defect of your code but from a larger than expected number of old Works 4.0 files. I wonder if any macro could be written to evade this problem. For each of those old files the conversion process was stopped, an annoying sounder was played, and I was shown a "Microsoft Office Word" "yellow triangle and black exclamation point" security warning. I was told the file "needs to be opened by the Works 4.0 for Windows text converter, which may pose a security risk if the file you are opening is a malicious file." It was necessary to left-click the security warning's "OK" button to proceed for each file. These files popped up persistently in the older sections of my directory. I wasn't given a "Yes to all" option, so the repeated displays of this warning slowed the batch coversion down and precluded the unattended automatic operation which your code would otherwise have been able to complete. If I'd left the system, hoping the conversion would have continued unattended until all files were converted, I'd have returned to find that the entire process had stopped as soon as the first of those old files was encountered. I'd been seeing those same security warnings when I was "banging through" lists of files which had been displayed by my desktop search engine. I may be able to set the desktop engine to look only for WPS files which were modified between dates which may be old enough to catch many of the old files. I can then use my own method of opening those files in Word 2007 by using their context menus directly in the search engine's list, and I can use my own simple "one at a time" macro to convert, save, and close each file from its Quick Access Toolbar in Word 2007. I can then return to the search engine's list for the next file, etc. Thanks again, Graham! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... ....I have found a minor bug in the add-in whilst testing, now fixed and updated on the web site. It shouldn't affect the process, but I took the opportunity to remove some superfluous code. It seems reliable even running it on my full C drive of 200 gb without drama! If it works for you, let me know and I'll post a permanent link on my web site... |
#17
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
The security warning will occur for any old files that don't use the current
Works converter and is out of my control. Microsoft has identified what it believes to be a potential security issue with the old converter and thus prompts for each such document. I have made a few minor modifications to the macro code concerned with presentation (that won't affect the security issue) and posted it with instructions to my web site - http://www.gmayor.com/Works_Batch_Converter.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jeffrey L. Hook wrote: Graham: I've tested your macro. The macro seemed to work well. Its icon button was displayed on the Developer ribbon when the DOTM file was opened directly from within the WinZip archive and I thought I could run the macro there if I could see it. When I clicked the macro's button I was shown the "Browse" dialogue, I selected the desired starting folder, and I clicked the "OK" button but the macro wouldn't run until I'd extracted it to the Word\STARTUP system folder which you identified. I tested the macro on a "straight copy" of my entire data directory which I'd pasted to an external USB2 hard drive on February 8th of this year. (That content had simply been copied via the Windows Explorer Edit\Copy and Edit\Paste menus from the data partition of one of the two internal hard drives to the data backup partition of the external hard drive.) The USB connection may have slowed the macro down but the speed seemed to be pretty good. I assume the macro may operate more quickly in the current directory on the internal hard drive. The macro didn't blacken the screen. It seemed to close all Word 2007 files which had been open when I ran it, asking me if I wished to save any unsaved changes, and closing without comment files which had no unsaved changes. It then operated "under cover of" the apparent "basic GUI" of the Word 2007 executable, the standard Word 2007 interface which was identified as Microsoft Word non-commercial use on its Title Bar. Text along the bottom of the Word GUI identified the files and indicated whether they were being converted or saved. The macro did "drill down" along file paths, through sub-directories. The only problem resulted not from any defect of your code but from a larger than expected number of old Works 4.0 files. I wonder if any macro could be written to evade this problem. For each of those old files the conversion process was stopped, an annoying sounder was played, and I was shown a "Microsoft Office Word" "yellow triangle and black exclamation point" security warning. I was told the file "needs to be opened by the Works 4.0 for Windows text converter, which may pose a security risk if the file you are opening is a malicious file." It was necessary to left-click the security warning's "OK" button to proceed for each file. These files popped up persistently in the older sections of my directory. I wasn't given a "Yes to all" option, so the repeated displays of this warning slowed the batch coversion down and precluded the unattended automatic operation which your code would otherwise have been able to complete. If I'd left the system, hoping the conversion would have continued unattended until all files were converted, I'd have returned to find that the entire process had stopped as soon as the first of those old files was encountered. I'd been seeing those same security warnings when I was "banging through" lists of files which had been displayed by my desktop search engine. I may be able to set the desktop engine to look only for WPS files which were modified between dates which may be old enough to catch many of the old files. I can then use my own method of opening those files in Word 2007 by using their context menus directly in the search engine's list, and I can use my own simple "one at a time" macro to convert, save, and close each file from its Quick Access Toolbar in Word 2007. I can then return to the search engine's list for the next file, etc. Thanks again, Graham! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... ...I have found a minor bug in the add-in whilst testing, now fixed and updated on the web site. It shouldn't affect the process, but I took the opportunity to remove some superfluous code. It seems reliable even running it on my full C drive of 200 gb without drama! If it works for you, let me know and I'll post a permanent link on my web site... |
#18
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
Graham: I've just finished running your excellent code on my entire data directory. Thanks to you, I've been able to convert all but 47 of those pesky WPS so far. The DOCX count is now 23,985. I think your code performed very well. If by changing the "presentation" you mean that you added some progress/activity display, I think that would be good. The lack of a clear display of what was happening was a little disconcerting, but Task Manager's Performance tab showed high CPU-use and its Applications tab did show names of files which were being processed. The best source of information was the Recycle Bin. Because your code used the Office\Convert converstion method, as I'd requested, rather than the Office\Save As\Word Document method, the WPS files were all pitched in the dust bin, as you might say, and it was actually fun to watch them accumulate there. This also showed how your mighty macro was plowing through the hierarchy. I indulged myself by trying to intercept it as it whizzed by. By noting the file names on the Applications tab in Task Manager I could expand some paths in the Folder pane of Windows Explorer in the Windows Classic View, and it was fun to see the WPS files shift to DOCX, so to speak, "as the train went by." An added benefit of the pitching of WPS files into the Recycle Bin is the option of sorting the bin's contents by date and time of deletion. This allowed me to select all items which had been deleted, for example, at 3:08 AM, starting with the first item with that minute value, and ending with the last items before 3:09 AM. I then deleted all selected files from the bin by using the context menu of the selected files, and Windows asked me if I wished to delete all XX items. Your "machine" ran at speeds of up to 75 conversions per minute in the light sections of my hierarchy. I was able to use my desktop search engine to work around the annoying security warnings for which no "Yes to all" response option was given. (I agree that none of that aggravation is your doing.) I checked my records of when I installed Works 6.0 as an upgrade of 4.5a and I found that, as I'd suspected, the "Works 4.0" security warnings were also given for all 4.5a files which hadn't previously been saved to 6.0 or 7.0 but they stopped as soon as I'd installed Works 6.0 so that showed me the chronological cut-off point for those warnings. There were 636 files which all produced the warnings and I was forced to convert them all "semi-manually" and individually using their context menus in the search list of my search engine and then using my own "one-shot" macro on each file in Word 2007. Once those truly annoying security warnings were out of its way your macro ran beatifully but the major impediment to this process was my own ignorance. The train metaphor seems to be good. I must admit "I left a lot of debris on the track." It derailed your macro many times. I'd been worrying about "propagating a taint" from Works to Word and I'd actually planned only to retain converted WPS files temporarily, until I could paste their converted contents to "clean, untainted" DOCX templates, which hadn't been converted from WPS and which had been created exclusively "from the keyboard" in Word 2007. I'd added a file-name suffix -Delete to the names of the WPS files so that, when they were converted to DOCX I'd be able to recognize them as possibly tainted, and as appropriate only as a source of converted content. I'd dutifully used the Office\Save As\Word Document conversion method which had been recommened by Word 2007's Help directory for a while, and that had left the original WPS files behind, so there were enough of these screwball situations that Word was hopelessly confused when it attempted to convert those files; it found DOCX files with the same name had already been created and that halted the process. I was able to use my desktop engine to search for files by name and, when I found both a WPS and DOCX file with the same name in the engine's search-results list, I simply deleted the WPS parts of those "pairs" right in the engine's list. Another problem wasn't in any way caused by your code. I do think excellent Help is provided on-line for Word 2007 but I'm not so happy about the organization of the information. I've found myself often "dumped" at a Table of Contents type Web page when I'm looking for guidance, as if I've been led to the library door and told to look for myself. The conversion process was many times interrupted by "serious problems" which crashed Word when Word attempted to convert some old corrupted Works junk. This lead to "recovery" of files and Word stubbornly insisted on showing me a lengthening list of such files, which it seemed to be insisting should be "Saved As" with new file names each time the conversion process was resumed. I admit I didn't have the foggiest idea of what was happening, but I wasn't given good guidance, and I didn't want to suspend this project while I invested a week browsing around widely-scattered on-line Help texts. I admit that I may have stressed Works' word processor by mistakes which I may have made in my past use of several versions of the application, but I also think Works is not as stable as it could be. I'm happy this is done at last. Thanks, Graham. I will be interested to check out your presentation of the code at your site, but right now I'm finally going to turn in "for the night" as dawn is breaking! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... The security warning will occur for any old files that don't use the current Works converter and is out of my control. Microsoft has identified what it believes to be a potential security issue with the old converter and thus prompts for each such document. I have made a few minor modifications to the macro code concerned with presentation (that won't affect the security issue) and posted it with instructions to my web site - http://www.gmayor.com/Works_Batch_Converter.htm |
#19
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
I avoided the use of a progress indicator as this would have only slowed the
process further - and you would still be up watching it run Glad you found it useful. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Jeffrey L. Hook wrote: Graham: I've just finished running your excellent code on my entire data directory. Thanks to you, I've been able to convert all but 47 of those pesky WPS so far. The DOCX count is now 23,985. I think your code performed very well. If by changing the "presentation" you mean that you added some progress/activity display, I think that would be good. The lack of a clear display of what was happening was a little disconcerting, but Task Manager's Performance tab showed high CPU-use and its Applications tab did show names of files which were being processed. The best source of information was the Recycle Bin. Because your code used the Office\Convert converstion method, as I'd requested, rather than the Office\Save As\Word Document method, the WPS files were all pitched in the dust bin, as you might say, and it was actually fun to watch them accumulate there. This also showed how your mighty macro was plowing through the hierarchy. I indulged myself by trying to intercept it as it whizzed by. By noting the file names on the Applications tab in Task Manager I could expand some paths in the Folder pane of Windows Explorer in the Windows Classic View, and it was fun to see the WPS files shift to DOCX, so to speak, "as the train went by." An added benefit of the pitching of WPS files into the Recycle Bin is the option of sorting the bin's contents by date and time of deletion. This allowed me to select all items which had been deleted, for example, at 3:08 AM, starting with the first item with that minute value, and ending with the last items before 3:09 AM. I then deleted all selected files from the bin by using the context menu of the selected files, and Windows asked me if I wished to delete all XX items. Your "machine" ran at speeds of up to 75 conversions per minute in the light sections of my hierarchy. I was able to use my desktop search engine to work around the annoying security warnings for which no "Yes to all" response option was given. (I agree that none of that aggravation is your doing.) I checked my records of when I installed Works 6.0 as an upgrade of 4.5a and I found that, as I'd suspected, the "Works 4.0" security warnings were also given for all 4.5a files which hadn't previously been saved to 6.0 or 7.0 but they stopped as soon as I'd installed Works 6.0 so that showed me the chronological cut-off point for those warnings. There were 636 files which all produced the warnings and I was forced to convert them all "semi-manually" and individually using their context menus in the search list of my search engine and then using my own "one-shot" macro on each file in Word 2007. Once those truly annoying security warnings were out of its way your macro ran beatifully but the major impediment to this process was my own ignorance. The train metaphor seems to be good. I must admit "I left a lot of debris on the track." It derailed your macro many times. I'd been worrying about "propagating a taint" from Works to Word and I'd actually planned only to retain converted WPS files temporarily, until I could paste their converted contents to "clean, untainted" DOCX templates, which hadn't been converted from WPS and which had been created exclusively "from the keyboard" in Word 2007. I'd added a file-name suffix -Delete to the names of the WPS files so that, when they were converted to DOCX I'd be able to recognize them as possibly tainted, and as appropriate only as a source of converted content. I'd dutifully used the Office\Save As\Word Document conversion method which had been recommened by Word 2007's Help directory for a while, and that had left the original WPS files behind, so there were enough of these screwball situations that Word was hopelessly confused when it attempted to convert those files; it found DOCX files with the same name had already been created and that halted the process. I was able to use my desktop engine to search for files by name and, when I found both a WPS and DOCX file with the same name in the engine's search-results list, I simply deleted the WPS parts of those "pairs" right in the engine's list. Another problem wasn't in any way caused by your code. I do think excellent Help is provided on-line for Word 2007 but I'm not so happy about the organization of the information. I've found myself often "dumped" at a Table of Contents type Web page when I'm looking for guidance, as if I've been led to the library door and told to look for myself. The conversion process was many times interrupted by "serious problems" which crashed Word when Word attempted to convert some old corrupted Works junk. This lead to "recovery" of files and Word stubbornly insisted on showing me a lengthening list of such files, which it seemed to be insisting should be "Saved As" with new file names each time the conversion process was resumed. I admit I didn't have the foggiest idea of what was happening, but I wasn't given good guidance, and I didn't want to suspend this project while I invested a week browsing around widely-scattered on-line Help texts. I admit that I may have stressed Works' word processor by mistakes which I may have made in my past use of several versions of the application, but I also think Works is not as stable as it could be. I'm happy this is done at last. Thanks, Graham. I will be interested to check out your presentation of the code at your site, but right now I'm finally going to turn in "for the night" as dawn is breaking! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... The security warning will occur for any old files that don't use the current Works converter and is out of my control. Microsoft has identified what it believes to be a potential security issue with the old converter and thus prompts for each such document. I have made a few minor modifications to the macro code concerned with presentation (that won't affect the security issue) and posted it with instructions to my web site - http://www.gmayor.com/Works_Batch_Converter.htm |
#20
|
|||
|
|||
How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously
It's probably a bit late to help you, but I believe I have resolved the
security warning issue. The revised version is on my web site. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Graham Mayor wrote: I avoided the use of a progress indicator as this would have only slowed the process further - and you would still be up watching it run Glad you found it useful. Jeffrey L. Hook wrote: Graham: I've just finished running your excellent code on my entire data directory. Thanks to you, I've been able to convert all but 47 of those pesky WPS so far. The DOCX count is now 23,985. I think your code performed very well. If by changing the "presentation" you mean that you added some progress/activity display, I think that would be good. The lack of a clear display of what was happening was a little disconcerting, but Task Manager's Performance tab showed high CPU-use and its Applications tab did show names of files which were being processed. The best source of information was the Recycle Bin. Because your code used the Office\Convert converstion method, as I'd requested, rather than the Office\Save As\Word Document method, the WPS files were all pitched in the dust bin, as you might say, and it was actually fun to watch them accumulate there. This also showed how your mighty macro was plowing through the hierarchy. I indulged myself by trying to intercept it as it whizzed by. By noting the file names on the Applications tab in Task Manager I could expand some paths in the Folder pane of Windows Explorer in the Windows Classic View, and it was fun to see the WPS files shift to DOCX, so to speak, "as the train went by." An added benefit of the pitching of WPS files into the Recycle Bin is the option of sorting the bin's contents by date and time of deletion. This allowed me to select all items which had been deleted, for example, at 3:08 AM, starting with the first item with that minute value, and ending with the last items before 3:09 AM. I then deleted all selected files from the bin by using the context menu of the selected files, and Windows asked me if I wished to delete all XX items. Your "machine" ran at speeds of up to 75 conversions per minute in the light sections of my hierarchy. I was able to use my desktop search engine to work around the annoying security warnings for which no "Yes to all" response option was given. (I agree that none of that aggravation is your doing.) I checked my records of when I installed Works 6.0 as an upgrade of 4.5a and I found that, as I'd suspected, the "Works 4.0" security warnings were also given for all 4.5a files which hadn't previously been saved to 6.0 or 7.0 but they stopped as soon as I'd installed Works 6.0 so that showed me the chronological cut-off point for those warnings. There were 636 files which all produced the warnings and I was forced to convert them all "semi-manually" and individually using their context menus in the search list of my search engine and then using my own "one-shot" macro on each file in Word 2007. Once those truly annoying security warnings were out of its way your macro ran beatifully but the major impediment to this process was my own ignorance. The train metaphor seems to be good. I must admit "I left a lot of debris on the track." It derailed your macro many times. I'd been worrying about "propagating a taint" from Works to Word and I'd actually planned only to retain converted WPS files temporarily, until I could paste their converted contents to "clean, untainted" DOCX templates, which hadn't been converted from WPS and which had been created exclusively "from the keyboard" in Word 2007. I'd added a file-name suffix -Delete to the names of the WPS files so that, when they were converted to DOCX I'd be able to recognize them as possibly tainted, and as appropriate only as a source of converted content. I'd dutifully used the Office\Save As\Word Document conversion method which had been recommened by Word 2007's Help directory for a while, and that had left the original WPS files behind, so there were enough of these screwball situations that Word was hopelessly confused when it attempted to convert those files; it found DOCX files with the same name had already been created and that halted the process. I was able to use my desktop engine to search for files by name and, when I found both a WPS and DOCX file with the same name in the engine's search-results list, I simply deleted the WPS parts of those "pairs" right in the engine's list. Another problem wasn't in any way caused by your code. I do think excellent Help is provided on-line for Word 2007 but I'm not so happy about the organization of the information. I've found myself often "dumped" at a Table of Contents type Web page when I'm looking for guidance, as if I've been led to the library door and told to look for myself. The conversion process was many times interrupted by "serious problems" which crashed Word when Word attempted to convert some old corrupted Works junk. This lead to "recovery" of files and Word stubbornly insisted on showing me a lengthening list of such files, which it seemed to be insisting should be "Saved As" with new file names each time the conversion process was resumed. I admit I didn't have the foggiest idea of what was happening, but I wasn't given good guidance, and I didn't want to suspend this project while I invested a week browsing around widely-scattered on-line Help texts. I admit that I may have stressed Works' word processor by mistakes which I may have made in my past use of several versions of the application, but I also think Works is not as stable as it could be. I'm happy this is done at last. Thanks, Graham. I will be interested to check out your presentation of the code at your site, but right now I'm finally going to turn in "for the night" as dawn is breaking! Jeff Hook, NJ, USA "Graham Mayor" wrote in message ... The security warning will occur for any old files that don't use the current Works converter and is out of my control. Microsoft has identified what it believes to be a potential security issue with the old converter and thus prompts for each such document. I have made a few minor modifications to the macro code concerned with presentation (that won't affect the security issue) and posted it with instructions to my web site - http://www.gmayor.com/Works_Batch_Converter.htm |
Thread Tools | |
Display Modes | |
|
|