Prev: I want to preview a file's content without opening the file, how .
Next: Windows Installer and other probloems with Office 2007
From: Ronald on 8 Nov 2009 11:48 Thanks Steve, But it appears that MS Word isn't such a reliable environment at all. It's better give up. I picked up some more problematic docs and opened directly with word file open command without any problems. Unfortunately the macro and word together act differently and results aren't convincing at all. World now has also crashed several times when macro is running. It's easier to sort manually. While I still don't believe, that there isn't any suitable and reliable document management application. Thanks! "Steve Rindsberg" <abuse(a)localhost.com> wrote in message news:VA.00005435.bcc205df(a)localhost.com... > > Hi Ronald, > > After this line: > > If Not oDoc Is Nothing Then oDoc.Close > > add > > Filecopy sdirectory & sfilename, "c:\badfile\directorypath\" & sfilename > > Substitute the actual directory you want to use in place of > > c:\badfile\directorypath\ > > In article <OQjx4h#XKHA.3720(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: >> PS. Steve if you have time to check the macro, then any question asked r >> error when opening the file should be sorted to 3rd category and closed >> ... >> if possible. >> Then I could check these files manually. Thanks for your time! >> >> Else it looks, that soon I have run out of time and must start sorting >> files >> manually. >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> news:VA.00005431.b3f864a9(a)localhost.com... >> > In article <uHZ0T#yXKHA.5368(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: >> >> Hi Steve, >> >> >> >> Great work. I'm trying to deserve this honor with implementing macro. >> >> As my VBA experiences never reached any acceptable level, there are >> >> soem >> >> questions. >> >> >> >> I found the single text to enter this macro an input file name, as >> >> below, >> >> but macro stops with pop up dialog "include trailing / character", _" >> >> Is there something else missing I have to enter? >> > >> > Yes ... very simple though. Change this: >> > >> > sInput = InputBox("E:\recup_doc_test/" _ >> > & vbCrLf _ >> > & "include trailing / character", _ >> > "Folder", "") >> > >> > to this: >> > >> > sInput = "E:\recup_doc_test\" >> > >> > (pardon the mistake in the "trailing / character" ... that should've >> > been >> > a / >> > character) >> > >> >> How the macro is expected to handle results - correct files and failed >> >> files, are these movied to other folder or just a list is created? >> > >> > It just creates a list. You can press Ctrl+G to see the debug output >> > (and >> > copy it to another file if you like) or at the end of the TestFiles >> > routine, >> > add Msgbox sMsg to see them on screen. >> > >> > We could probably modify it to move the files to a known folder if you >> > like, >> > or maybe rename them to BAD_originalName or the like. >> > >> >> >> >> Thank you! >> >> >> >> That's the part I added my folder name: >> >> >> >> Sub RunMe() >> >> Dim sInput As String >> >> >> >> sInput = InputBox("E:\recup_doc_test/" _ >> >> & vbCrLf _ >> >> & "include trailing / character", _ >> >> "Folder", "") >> >> If Len(sInput) > 0 Then >> >> Call TestFiles(sInput) >> >> End If >> >> >> >> End Sub >> >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> >> news:VA.0000542a.b2a4d4ed(a)localhost.com... >> >> > In article <e9N9SwmXKHA.4148(a)TK2MSFTNGP04.phx.gbl>, Ronald wrote: >> >> >> Thanks, such macro would be a great thing and I just didn't dare to >> >> >> ask >> >> >> such >> >> >> a big thing :-) >> >> >> Writing good macros isn't such easy >> >> > >> >> > No, and I don't claim to be a good Word VBA coder, not by any >> >> > stretch >> >> > of >> >> > the >> >> > imagination. But this seems like it might work: >> >> > >> >> > Option Explicit >> >> > >> >> > Sub RunMe() >> >> > Dim sInput As String >> >> > >> >> > sInput = InputBox("Enter full path to folder where files are >> >> > stored" >> >> > _ >> >> > & vbcrlf _ >> >> > & "include trailing / character", _ >> >> > "Folder", "") >> >> > If Len(sInput) > 0 Then >> >> > Call TestFiles(sInput) >> >> > End If >> >> > >> >> > End Sub >> >> > >> >> > Sub TestFiles(sDirectory As String) >> >> > Dim sMsg As String >> >> > Dim sFileName As String >> >> > Dim oDoc As Document >> >> > >> >> > sFileName = Dir$(sDirectory & "*.doc") >> >> > While Len(sFileName) > 0 >> >> > On Error Resume Next >> >> > >> >> > ' Try to open the file >> >> > Set oDoc = Documents.Open( _ >> >> > FileName:=sDirectory & sFileName, >> >> > Format:=wdOpenFormatDocument) >> >> > If Err.Number = 0 Then >> >> > ' opened it ok >> >> > oDoc.Close >> >> > Else >> >> > sMsg = sMsg & sDirectory & sFileName & vbCrLf >> >> > Debug.Print sDirectory & sFileName >> >> > If Not oDoc Is Nothing Then oDoc.Close >> >> > End If >> >> > Err.Clear >> >> > On Error GoTo 0 >> >> > >> >> > ' get another file >> >> > sFileName = Dir$() >> >> > >> >> > Wend >> >> > >> >> > End Sub >> >> > >> >> > >> >> > >> >> > >> >> > and I was sure it's an easy cake to find >> >> >> a good document browser (which I could keep for the rest of life >> >> >> :-)) >> >> >> and >> >> >> when not found I just blamed my bad luck while googling. >> >> >> >> >> >> Trying to open word doc and if there is any error moving to >> >> >> whatever >> >> >> next >> >> >> folder macro would be great! >> >> >> Some files require installation of obscure office component, which >> >> >> even >> >> >> when >> >> >> installed is required again each time and I believe these are just >> >> >> corrupt >> >> >> and other files weirdly reported that network site not available >> >> >> when >> >> >> trying >> >> >> to preview with word open, while file were all in the same folder >> >> >> with >> >> >> normal names, but obviously a just kind of MS Word bug. As I just >> >> >> afterwards >> >> >> learnt that MS Word Preview may have failed with correct files, I >> >> >> need >> >> >> now >> >> >> to start the whole work over again, as likely I had deleted also >> >> >> proper >> >> >> files from my work directory.. >> >> >> >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> >> >> news:VA.00005427.ae8d77dd(a)localhost.com... >> >> >> > In article <#v7LBqlXKHA.872(a)TK2MSFTNGP05.phx.gbl>, Ronald wrote: >> >> >> >> Thanks for your friendly suggestions, but I'm more a technician >> >> >> >> and >> >> >> >> my >> >> >> >> purpose is to sort out corrupted documents. >> >> >> > >> >> >> > It would've been useful if you'd mentioned that in the first >> >> >> > place. >> >> >> > It shouldn't be too difficult to write a macro that attempts to >> >> >> > open >> >> >> > each >> >> >> > DOC >> >> >> > in a folder, traps any errors that result and reports the names >> >> >> > of >> >> >> > files >> >> >> > that >> >> >> > provoke errors. >> >> >> > >> >> >> > Would something like that be sufficient? >> >> >> > >> >> >> > >> >> >> > >> >> >> >> >> >> >> >> To my suprise - I have found myself in a stone age! >> >> >> >> The single working solution appears to be double click each >> >> >> >> documents, >> >> >> >> wait >> >> >> >> until it's opened or until Word reports it can't be opened and >> >> >> >> then >> >> >> >> switch >> >> >> >> back to file explorer and drag the file to the according folder. >> >> >> >> I >> >> >> >> have >> >> >> >> spent almost 2 days searching for a suitable solution, while >> >> >> >> during >> >> >> >> these >> >> >> >> 2 >> >> >> >> days I probably already had finished the work manually! >> >> >> >> >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> news:eS7hMXlXKHA.4588(a)TK2MSFTNGP04.phx.gbl... >> >> >> >> > Since they are documents perhaps doing search for text and >> >> >> >> > then >> >> >> >> > you >> >> >> >> > may >> >> >> >> > drag and drop the found files into the proper folders that >> >> >> >> > way? >> >> >> >> > >> >> >> >> > Ronald wrote: >> >> >> >> >> Hi Bob, >> >> >> >> >> >> >> >> >> >> I have got the bunch of word documents, which names don't >> >> >> >> >> have >> >> >> >> >> names >> >> >> >> >> but >> >> >> >> >> machinery generated numbers instead. >> >> >> >> >> I have googled and tried following applications - File >> >> >> >> >> center, >> >> >> >> >> Turbo >> >> >> >> >> Browser, FilePreview and some others each of has required >> >> >> >> >> more >> >> >> >> >> or >> >> >> >> >> less >> >> >> >> >> time just to find out that these aren't up to the task. >> >> >> >> >> >> >> >> >> >> So finally I have returned where I started, that is the >> >> >> >> >> Word's >> >> >> >> >> own >> >> >> >> >> File >> >> >> >> >> Open Preview, which you also suggested ..... >> >> >> >> >> But results aren't much better - Word 2003 preview is capable >> >> >> >> >> to >> >> >> >> >> preview >> >> >> >> >> only some 20-30 files and then there starts to appear >> >> >> >> >> occasionally >> >> >> >> >> a >> >> >> >> >> text >> >> >> >> >> "Preview not available", after what I have to close Office >> >> >> >> >> and >> >> >> >> >> reopen, >> >> >> >> >> in >> >> >> >> >> order the preview to function again. On other PC where I >> >> >> >> >> installed >> >> >> >> >> Office >> >> >> >> >> 2007 open/preview doesn't work as expected at all, because >> >> >> >> >> Office >> >> >> >> >> 2007 >> >> >> >> >> keeps Previewed files open and I can't sort with drag and >> >> >> >> >> drop >> >> >> >> >> files >> >> >> >> >> to >> >> >> >> >> appropriate folders. >> >> >> >> >> >> >> >> >> >> Still I have an imagination, how work would flow, when there >> >> >> >> >> is >> >> >> >> >> an >> >> >> >> >> bug >> >> >> >> >> free photo album and slide show like document browser .... >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >> news:OqnqCXkXKHA.844(a)TK2MSFTNGP05.phx.gbl... >> >> >> >> >> >> >> >> >> >>>Seems that insufficient thought was given to naming the >> >> >> >> >>>documents. >> >> >> >> >>>What >> >> >> >> >>>is it you actually want to find by "browsing" a document? >> >> >> >> >>> >> >> >> >> >>>Ronald wrote: >> >> >> >> >>> >> >> >> >> >>> >> >> >> >> >>>>Hi Bob >> >> >> >> >>>> >> >> >> >> >>>>The same is available in Office 2003 and not sufficent for >> >> >> >> >>>>browsing >> >> >> >> >>>>700 >> >> >> >> >>>>documents named just by numbers. >> >> >> >> >>>>I have downloaded several appliocations which claim to offer >> >> >> >> >>>>required >> >> >> >> >>>>functionality but no luck, these are capable to0 open only >> >> >> >> >>>>50% >> >> >> >> >>>>of >> >> >> >> >>>>docs >> >> >> >> >>>>or so sloooow, that I have stopped evaluating. >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>>"Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >>>>news:uXVgBvhXKHA.3612(a)TK2MSFTNGP02.phx.gbl... >> >> >> >> >>>> >> >> >> >> >>>> >> >> >> >> >>>>>Open Word, clicl Office Button, click Open, Set the View to >> >> >> >> >>>>>"Preview" >> >> >> >> >>>>>(icon in upper right of Open dialog) select file to >> >> >> >> >>>>>preview. >> >> >> >> >>>>> >> >> >> >> >>>>>Ronald wrote: >> >> >> >> >>>>> >> >> >> >> >>>>> >> >> >> >> >>>>> >> >> >> >> >>>>>>Hi >> >> >> >> >>>>>> >> >> >> >> >>>>>>I installed Office 2007 in Trial mode but couldn't find >> >> >> >> >>>>>>any >> >> >> >> >>>>>>searched >> >> >> >> >>>>>>function. >> >> >> >> >>>>>> >> >> >> >> >>>>>>Which Office 2007 part offers 1. a stepping through >> >> >> >> >>>>>>documents >> >> >> >> >>>>>>in >> >> >> >> >>>>>>one >> >> >> >> >>>>>>folder (like a slideshow) or 2. a folder documents album >> >> >> >> >>>>>>thumbnail >> >> >> >> >>>>>>preview mode? >> >> >> >> >>>>>> >> >> >> >> >>>>>>Could you please be more precise? >> >> >> >> >>>>>> >> >> >> >> >>>>>>Thanks! >> >> >> >> >>>>>> >> >> >> >> >>>>>>"Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >>>>>>news:<e3uhtOZXKHA.408(a)TK2MSFTNGP04.phx.gbl>... >> >> >> >> >>>>>> >> >> >> >> >>>>>> >> >> >> >> >>>>>> >> >> >> >> >>>>>> >> >> >> >> >>>>>>>The trial version of Office 2007 is the latest "viewer". >> >> >> >> >>>>>> >> >> >> >> >>>>>> >> >> >> >> >>>>>> >> >> >> >> >>>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> >> > >> > >> > >> > > > >
From: Steve Rindsberg on 8 Nov 2009 14:50 In article <#ZZEGNJYKHA.928(a)TK2MSFTNGP06.phx.gbl>, Ronald wrote: > Thanks Steve, > > But it appears that MS Word isn't such a reliable environment at all. Or there's something in your environment that's making odd things happen ... either way, you might also want to post the code so far and mention the various issues you've run into in one of the Word-specific groups. You might be able to find someone who's genuinely familiar with Word automation. I warned you that I wasn't <g> > It's better give up. I picked up some more problematic docs and opened > directly with word file open command without any problems. > Unfortunately the macro and word together act differently and results aren't > convincing at all. > World now has also crashed several times when macro is running. > It's easier to sort manually. > While I still don't believe, that there isn't any suitable and reliable > document management application. > > Thanks! > > "Steve Rindsberg" <abuse(a)localhost.com> wrote in message > news:VA.00005435.bcc205df(a)localhost.com... > > > > Hi Ronald, > > > > After this line: > > > > If Not oDoc Is Nothing Then oDoc.Close > > > > add > > > > Filecopy sdirectory & sfilename, "c:\badfile\directorypath\" & sfilename > > > > Substitute the actual directory you want to use in place of > > > > c:\badfile\directorypath\ > > > > In article <OQjx4h#XKHA.3720(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: > >> PS. Steve if you have time to check the macro, then any question asked r > >> error when opening the file should be sorted to 3rd category and closed > >> ... > >> if possible. > >> Then I could check these files manually. Thanks for your time! > >> > >> Else it looks, that soon I have run out of time and must start sorting > >> files > >> manually. > >> > >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message > >> news:VA.00005431.b3f864a9(a)localhost.com... > >> > In article <uHZ0T#yXKHA.5368(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: > >> >> Hi Steve, > >> >> > >> >> Great work. I'm trying to deserve this honor with implementing macro. > >> >> As my VBA experiences never reached any acceptable level, there are > >> >> soem > >> >> questions. > >> >> > >> >> I found the single text to enter this macro an input file name, as > >> >> below, > >> >> but macro stops with pop up dialog "include trailing / character", _" > >> >> Is there something else missing I have to enter? > >> > > >> > Yes ... very simple though. Change this: > >> > > >> > sInput = InputBox("E:\recup_doc_test/" _ > >> > & vbCrLf _ > >> > & "include trailing / character", _ > >> > "Folder", "") > >> > > >> > to this: > >> > > >> > sInput = "E:\recup_doc_test\" > >> > > >> > (pardon the mistake in the "trailing / character" ... that should've > >> > been > >> > a / > >> > character) > >> > > >> >> How the macro is expected to handle results - correct files and failed > >> >> files, are these movied to other folder or just a list is created? > >> > > >> > It just creates a list. You can press Ctrl+G to see the debug output > >> > (and > >> > copy it to another file if you like) or at the end of the TestFiles > >> > routine, > >> > add Msgbox sMsg to see them on screen. > >> > > >> > We could probably modify it to move the files to a known folder if you > >> > like, > >> > or maybe rename them to BAD_originalName or the like. > >> > > >> >> > >> >> Thank you! > >> >> > >> >> That's the part I added my folder name: > >> >> > >> >> Sub RunMe() > >> >> Dim sInput As String > >> >> > >> >> sInput = InputBox("E:\recup_doc_test/" _ > >> >> & vbCrLf _ > >> >> & "include trailing / character", _ > >> >> "Folder", "") > >> >> If Len(sInput) > 0 Then > >> >> Call TestFiles(sInput) > >> >> End If > >> >> > >> >> End Sub > >> >> > >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message > >> >> news:VA.0000542a.b2a4d4ed(a)localhost.com... > >> >> > In article <e9N9SwmXKHA.4148(a)TK2MSFTNGP04.phx.gbl>, Ronald wrote: > >> >> >> Thanks, such macro would be a great thing and I just didn't dare to > >> >> >> ask > >> >> >> such > >> >> >> a big thing :-) > >> >> >> Writing good macros isn't such easy > >> >> > > >> >> > No, and I don't claim to be a good Word VBA coder, not by any > >> >> > stretch > >> >> > of > >> >> > the > >> >> > imagination. But this seems like it might work: > >> >> > > >> >> > Option Explicit > >> >> > > >> >> > Sub RunMe() > >> >> > Dim sInput As String > >> >> > > >> >> > sInput = InputBox("Enter full path to folder where files are > >> >> > stored" > >> >> > _ > >> >> > & vbcrlf _ > >> >> > & "include trailing / character", _ > >> >> > "Folder", "") > >> >> > If Len(sInput) > 0 Then > >> >> > Call TestFiles(sInput) > >> >> > End If > >> >> > > >> >> > End Sub > >> >> > > >> >> > Sub TestFiles(sDirectory As String) > >> >> > Dim sMsg As String > >> >> > Dim sFileName As String > >> >> > Dim oDoc As Document > >> >> > > >> >> > sFileName = Dir$(sDirectory & "*.doc") > >> >> > While Len(sFileName) > 0 > >> >> > On Error Resume Next > >> >> > > >> >> > ' Try to open the file > >> >> > Set oDoc = Documents.Open( _ > >> >> > FileName:=sDirectory & sFileName, > >> >> > Format:=wdOpenFormatDocument) > >> >> > If Err.Number = 0 Then > >> >> > ' opened it ok > >> >> > oDoc.Close > >> >> > Else > >> >> > sMsg = sMsg & sDirectory & sFileName & vbCrLf > >> >> > Debug.Print sDirectory & sFileName > >> >> > If Not oDoc Is Nothing Then oDoc.Close > >> >> > End If > >> >> > Err.Clear > >> >> > On Error GoTo 0 > >> >> > > >> >> > ' get another file > >> >> > sFileName = Dir$() > >> >> > > >> >> > Wend > >> >> > > >> >> > End Sub > >> >> > > >> >> > > >> >> > > >> >> > > >> >> > and I was sure it's an easy cake to find > >> >> >> a good document browser (which I could keep for the rest of life > >> >> >> :-)) > >> >> >> and > >> >> >> when not found I just blamed my bad luck while googling. > >> >> >> > >> >> >> Trying to open word doc and if there is any error moving to > >> >> >> whatever > >> >> >> next > >> >> >> folder macro would be great! > >> >> >> Some files require installation of obscure office component, which > >> >> >> even > >> >> >> when > >> >> >> installed is required again each time and I believe these are just > >> >> >> corrupt > >> >> >> and other files weirdly reported that network site not available > >> >> >> when > >> >> >> trying > >> >> >> to preview with word open, while file were all in the same folder > >> >> >> with > >> >> >> normal names, but obviously a just kind of MS Word bug. As I just > >> >> >> afterwards > >> >> >> learnt that MS Word Preview may have failed with correct files, I > >> >> >> need > >> >> >> now > >> >> >> to start the whole work over again, as likely I had deleted also > >> >> >> proper > >> >> >> files from my work directory.. > >> >> >> > >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message > >> >> >> news:VA.00005427.ae8d77dd(a)localhost.com... > >> >> >> > In article <#v7LBqlXKHA.872(a)TK2MSFTNGP05.phx.gbl>, Ronald wrote: > >> >> >> >> Thanks for your friendly suggestions, but I'm more a technician > >> >> >> >> and > >> >> >> >> my > >> >> >> >> purpose is to sort out corrupted documents. > >> >> >> > > >> >> >> > It would've been useful if you'd mentioned that in the first > >> >> >> > place. > >> >> >> > It shouldn't be too difficult to write a macro that attempts to > >> >> >> > open > >> >> >> > each > >> >> >> > DOC > >> >> >> > in a folder, traps any errors that result and reports the names > >> >> >> > of > >> >> >> > files > >> >> >> > that > >> >> >> > provoke errors. > >> >> >> > > >> >> >> > Would something like that be sufficient? > >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> >> > >> >> >> >> To my suprise - I have found myself in a stone age! > >> >> >> >> The single working solution appears to be double click each > >> >> >> >> documents, > >> >> >> >> wait > >> >> >> >> until it's opened or until Word reports it can't be opened and > >> >> >> >> then > >> >> >> >> switch > >> >> >> >> back to file explorer and drag the file to the according folder. > >> >> >> >> I > >> >> >> >> have > >> >> >> >> spent almost 2 days searching for a suitable solution, while > >> >> >> >> during > >> >> >> >> these > >> >> >> >> 2 > >> >> >> >> days I probably already had finished the work manually! > >> >> >> >> > >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message > >> >> >> >> news:eS7hMXlXKHA.4588(a)TK2MSFTNGP04.phx.gbl... > >> >> >> >> > Since they are documents perhaps doing search for text and > >> >> >> >> > then > >> >> >> >> > you > >> >> >> >> > may > >> >> >> >> > drag and drop the found files into the proper folders that > >> >> >> >> > way? > >> >> >> >> > > >> >> >> >> > Ronald wrote: > >> >> >> >> >> Hi Bob, > >> >> >> >> >> > >> >> >> >> >> I have got the bunch of word documents, which names don't > >> >> >> >> >> have > >> >> >> >> >> names > >> >> >> >> >> but > >> >> >> >> >> machinery generated numbers instead. > >> >> >> >> >> I have googled and tried following applications - File > >> >> >> >> >> center, > >> >> >> >> >> Turbo > >> >> >> >> >> Browser, FilePreview and some others each of has required > >> >> >> >> >> more > >> >> >> >> >> or > >> >> >> >> >> less > >> >> >> >> >> time just to find out that these aren't up to the task. > >> >> >> >> >> > >> >> >> >> >> So finally I have returned where I started, that is the > >> >> >> >> >> Word's > >> >> >> >> >> own > >> >> >> >> >> File > >> >> >> >> >> Open Preview, which you also suggested ..... > >> >> >> >> >> But results aren't much better - Word 2003 preview is capable > >> >> >> >> >> to > >> >> >> >> >> preview > >> >> >> >> >> only some 20-30 files and then there starts to appear > >> >> >> >> >> occasionally > >> >> >> >> >> a > >> >> >> >> >> text > >> >> >> >> >> "Preview not available", after what I have to close Office > >> >> >> >> >> and > >> >> >> >> >> reopen, > >> >> >> >> >> in > >> >> >> >> >> order the preview to function again. On other PC where I > >> >> >> >> >> installed > >> >> >> >> >> Office > >> >> >> >> >> 2007 open/preview doesn't work as expected at all, because > >> >> >> >> >> Office > >> >> >> >> >> 2007 > >> >> >> >> >> keeps Previewed files open and I can't sort with drag and > >> >> >> >> >> drop > >> >> >> >> >> files > >> >> >> >> >> to > >> >> >> >> >> appropriate folders. > >> >> >> >> >> > >> >> >> >> >> Still I have an imagination, how work would flow, when there > >> >> >> >> >> is > >> >> >> >> >> an > >> >> >> >> >> bug > >> >> >> >> >> free photo album and slide show like document browser .... > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message > >> >> >> >> >> news:OqnqCXkXKHA.844(a)TK2MSFTNGP05.phx.gbl... > >> >> >> >> >> > >> >> >> >> >>>Seems that insufficient thought was given to naming the > >> >> >> >> >>>documents. > >> >> >> >> >>>What > >> >> >> >> >>>is it you actually want to find by "browsing" a document? > >> >> >> >> >>> > >> >> >> >> >>>Ronald wrote: > >> >> >> >> >>> > >> >> >> >> >>> > >> >> >> >> >>>>Hi Bob > >> >> >> >> >>>> > >> >> >> >> >>>>The same is available in Office 2003 and not sufficent for > >> >> >> >> >>>>browsing > >> >> >> >> >>>>700 > >> >> >> >> >>>>documents named just by numbers. > >> >> >> >> >>>>I have downloaded several appliocations which claim to offer > >> >> >> >> >>>>required > >> >> >> >> >>>>functionality but no luck, these are capable to0 open only > >> >> >> >> >>>>50% > >> >> >> >> >>>>of > >> >> >> >> >>>>docs > >> >> >> >> >>>>or so sloooow, that I have stopped evaluating. > >> >> >> >> >>>> > >> >> >> >> >>>> > >> >> >> >> >>>> > >> >> >> >> >>>>"Bob I" <birelan(a)yahoo.com> wrote in message > >> >> >> >> >>>>news:uXVgBvhXKHA.3612(a)TK2MSFTNGP02.phx.gbl... > >> >> >> >> >>>> > >> >> >> >> >>>> > >> >> >> >> >>>>>Open Word, clicl Office Button, click Open, Set the View to > >> >> >> >> >>>>>"Preview" > >> >> >> >> >>>>>(icon in upper right of Open dialog) select file to > >> >> >> >> >>>>>preview. > >> >> >> >> >>>>> > >> >> >> >> >>>>>Ronald wrote: > >> >> >> >> >>>>> > >> >> >> >> >>>>> > >> >> >> >> >>>>> > >> >> >> >> >>>>>>Hi > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>I installed Office 2007 in Trial mode but couldn't find > >> >> >> >> >>>>>>any > >> >> >> >> >>>>>>searched > >> >> >> >> >>>>>>function. > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>Which Office 2007 part offers 1. a stepping through > >> >> >> >> >>>>>>documents > >> >> >> >> >>>>>>in > >> >> >> >> >>>>>>one > >> >> >> >> >>>>>>folder (like a slideshow) or 2. a folder documents album > >> >> >> >> >>>>>>thumbnail > >> >> >> >> >>>>>>preview mode? > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>Could you please be more precise? > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>Thanks! > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>"Bob I" <birelan(a)yahoo.com> wrote in message > >> >> >> >> >>>>>>news:<e3uhtOZXKHA.408(a)TK2MSFTNGP04.phx.gbl>... > >> >> >> >> >>>>>> > >> >> >> >> >>>>>> > >> >> >> >> >>>>>> > >> >> >> >> >>>>>> > >> >> >> >> >>>>>>>The trial version of Office 2007 is the latest "viewer". > >> >> >> >> >>>>>> > >> >> >> >> >>>>>> > >> >> >> >> >>>>>> > >> >> >> >> >>>> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> > > >> >> >> > > >> >> >> > > >> >> >> > > >> >> > > >> >> > > >> >> > > >> > > >> > > >> > > > > > > >
From: Ronald on 8 Nov 2009 18:11 Hi Steve, Thanks for your help, you did a great work! I have been working and providing Windows PC support for 15 years and problem or anomalies are nothing new. Windows and Office never have provided too much of sureness, that's where the problem is. I sorted files manually. with BR "Steve Rindsberg" <abuse(a)localhost.com> wrote in message news:VA.00005438.bd85dcd2(a)localhost.com... > In article <#ZZEGNJYKHA.928(a)TK2MSFTNGP06.phx.gbl>, Ronald wrote: >> Thanks Steve, >> >> But it appears that MS Word isn't such a reliable environment at all. > > Or there's something in your environment that's making odd things happen > ... > either way, you might also want to post the code so far and mention the > various > issues you've run into in one of the Word-specific groups. You might be > able > to find someone who's genuinely familiar with Word automation. I warned > you > that I wasn't <g> > > >> It's better give up. I picked up some more problematic docs and opened >> directly with word file open command without any problems. >> Unfortunately the macro and word together act differently and results >> aren't >> convincing at all. >> World now has also crashed several times when macro is running. >> It's easier to sort manually. >> While I still don't believe, that there isn't any suitable and reliable >> document management application. >> >> Thanks! >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> news:VA.00005435.bcc205df(a)localhost.com... >> > >> > Hi Ronald, >> > >> > After this line: >> > >> > If Not oDoc Is Nothing Then oDoc.Close >> > >> > add >> > >> > Filecopy sdirectory & sfilename, "c:\badfile\directorypath\" & >> > sfilename >> > >> > Substitute the actual directory you want to use in place of >> > >> > c:\badfile\directorypath\ >> > >> > In article <OQjx4h#XKHA.3720(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: >> >> PS. Steve if you have time to check the macro, then any question asked >> >> r >> >> error when opening the file should be sorted to 3rd category and >> >> closed >> >> ... >> >> if possible. >> >> Then I could check these files manually. Thanks for your time! >> >> >> >> Else it looks, that soon I have run out of time and must start sorting >> >> files >> >> manually. >> >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> >> news:VA.00005431.b3f864a9(a)localhost.com... >> >> > In article <uHZ0T#yXKHA.5368(a)TK2MSFTNGP02.phx.gbl>, Ronald wrote: >> >> >> Hi Steve, >> >> >> >> >> >> Great work. I'm trying to deserve this honor with implementing >> >> >> macro. >> >> >> As my VBA experiences never reached any acceptable level, there are >> >> >> soem >> >> >> questions. >> >> >> >> >> >> I found the single text to enter this macro an input file name, as >> >> >> below, >> >> >> but macro stops with pop up dialog "include trailing / character", >> >> >> _" >> >> >> Is there something else missing I have to enter? >> >> > >> >> > Yes ... very simple though. Change this: >> >> > >> >> > sInput = InputBox("E:\recup_doc_test/" _ >> >> > & vbCrLf _ >> >> > & "include trailing / character", _ >> >> > "Folder", "") >> >> > >> >> > to this: >> >> > >> >> > sInput = "E:\recup_doc_test\" >> >> > >> >> > (pardon the mistake in the "trailing / character" ... that should've >> >> > been >> >> > a / >> >> > character) >> >> > >> >> >> How the macro is expected to handle results - correct files and >> >> >> failed >> >> >> files, are these movied to other folder or just a list is created? >> >> > >> >> > It just creates a list. You can press Ctrl+G to see the debug >> >> > output >> >> > (and >> >> > copy it to another file if you like) or at the end of the TestFiles >> >> > routine, >> >> > add Msgbox sMsg to see them on screen. >> >> > >> >> > We could probably modify it to move the files to a known folder if >> >> > you >> >> > like, >> >> > or maybe rename them to BAD_originalName or the like. >> >> > >> >> >> >> >> >> Thank you! >> >> >> >> >> >> That's the part I added my folder name: >> >> >> >> >> >> Sub RunMe() >> >> >> Dim sInput As String >> >> >> >> >> >> sInput = InputBox("E:\recup_doc_test/" _ >> >> >> & vbCrLf _ >> >> >> & "include trailing / character", _ >> >> >> "Folder", "") >> >> >> If Len(sInput) > 0 Then >> >> >> Call TestFiles(sInput) >> >> >> End If >> >> >> >> >> >> End Sub >> >> >> >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> >> >> news:VA.0000542a.b2a4d4ed(a)localhost.com... >> >> >> > In article <e9N9SwmXKHA.4148(a)TK2MSFTNGP04.phx.gbl>, Ronald wrote: >> >> >> >> Thanks, such macro would be a great thing and I just didn't dare >> >> >> >> to >> >> >> >> ask >> >> >> >> such >> >> >> >> a big thing :-) >> >> >> >> Writing good macros isn't such easy >> >> >> > >> >> >> > No, and I don't claim to be a good Word VBA coder, not by any >> >> >> > stretch >> >> >> > of >> >> >> > the >> >> >> > imagination. But this seems like it might work: >> >> >> > >> >> >> > Option Explicit >> >> >> > >> >> >> > Sub RunMe() >> >> >> > Dim sInput As String >> >> >> > >> >> >> > sInput = InputBox("Enter full path to folder where files are >> >> >> > stored" >> >> >> > _ >> >> >> > & vbcrlf _ >> >> >> > & "include trailing / character", _ >> >> >> > "Folder", "") >> >> >> > If Len(sInput) > 0 Then >> >> >> > Call TestFiles(sInput) >> >> >> > End If >> >> >> > >> >> >> > End Sub >> >> >> > >> >> >> > Sub TestFiles(sDirectory As String) >> >> >> > Dim sMsg As String >> >> >> > Dim sFileName As String >> >> >> > Dim oDoc As Document >> >> >> > >> >> >> > sFileName = Dir$(sDirectory & "*.doc") >> >> >> > While Len(sFileName) > 0 >> >> >> > On Error Resume Next >> >> >> > >> >> >> > ' Try to open the file >> >> >> > Set oDoc = Documents.Open( _ >> >> >> > FileName:=sDirectory & sFileName, >> >> >> > Format:=wdOpenFormatDocument) >> >> >> > If Err.Number = 0 Then >> >> >> > ' opened it ok >> >> >> > oDoc.Close >> >> >> > Else >> >> >> > sMsg = sMsg & sDirectory & sFileName & vbCrLf >> >> >> > Debug.Print sDirectory & sFileName >> >> >> > If Not oDoc Is Nothing Then oDoc.Close >> >> >> > End If >> >> >> > Err.Clear >> >> >> > On Error GoTo 0 >> >> >> > >> >> >> > ' get another file >> >> >> > sFileName = Dir$() >> >> >> > >> >> >> > Wend >> >> >> > >> >> >> > End Sub >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> >> > and I was sure it's an easy cake to find >> >> >> >> a good document browser (which I could keep for the rest of life >> >> >> >> :-)) >> >> >> >> and >> >> >> >> when not found I just blamed my bad luck while googling. >> >> >> >> >> >> >> >> Trying to open word doc and if there is any error moving to >> >> >> >> whatever >> >> >> >> next >> >> >> >> folder macro would be great! >> >> >> >> Some files require installation of obscure office component, >> >> >> >> which >> >> >> >> even >> >> >> >> when >> >> >> >> installed is required again each time and I believe these are >> >> >> >> just >> >> >> >> corrupt >> >> >> >> and other files weirdly reported that network site not available >> >> >> >> when >> >> >> >> trying >> >> >> >> to preview with word open, while file were all in the same >> >> >> >> folder >> >> >> >> with >> >> >> >> normal names, but obviously a just kind of MS Word bug. As I >> >> >> >> just >> >> >> >> afterwards >> >> >> >> learnt that MS Word Preview may have failed with correct files, >> >> >> >> I >> >> >> >> need >> >> >> >> now >> >> >> >> to start the whole work over again, as likely I had deleted also >> >> >> >> proper >> >> >> >> files from my work directory.. >> >> >> >> >> >> >> >> "Steve Rindsberg" <abuse(a)localhost.com> wrote in message >> >> >> >> news:VA.00005427.ae8d77dd(a)localhost.com... >> >> >> >> > In article <#v7LBqlXKHA.872(a)TK2MSFTNGP05.phx.gbl>, Ronald >> >> >> >> > wrote: >> >> >> >> >> Thanks for your friendly suggestions, but I'm more a >> >> >> >> >> technician >> >> >> >> >> and >> >> >> >> >> my >> >> >> >> >> purpose is to sort out corrupted documents. >> >> >> >> > >> >> >> >> > It would've been useful if you'd mentioned that in the first >> >> >> >> > place. >> >> >> >> > It shouldn't be too difficult to write a macro that attempts >> >> >> >> > to >> >> >> >> > open >> >> >> >> > each >> >> >> >> > DOC >> >> >> >> > in a folder, traps any errors that result and reports the >> >> >> >> > names >> >> >> >> > of >> >> >> >> > files >> >> >> >> > that >> >> >> >> > provoke errors. >> >> >> >> > >> >> >> >> > Would something like that be sufficient? >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> >> >> >> >> >> >> >> To my suprise - I have found myself in a stone age! >> >> >> >> >> The single working solution appears to be double click each >> >> >> >> >> documents, >> >> >> >> >> wait >> >> >> >> >> until it's opened or until Word reports it can't be opened >> >> >> >> >> and >> >> >> >> >> then >> >> >> >> >> switch >> >> >> >> >> back to file explorer and drag the file to the according >> >> >> >> >> folder. >> >> >> >> >> I >> >> >> >> >> have >> >> >> >> >> spent almost 2 days searching for a suitable solution, while >> >> >> >> >> during >> >> >> >> >> these >> >> >> >> >> 2 >> >> >> >> >> days I probably already had finished the work manually! >> >> >> >> >> >> >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >> news:eS7hMXlXKHA.4588(a)TK2MSFTNGP04.phx.gbl... >> >> >> >> >> > Since they are documents perhaps doing search for text and >> >> >> >> >> > then >> >> >> >> >> > you >> >> >> >> >> > may >> >> >> >> >> > drag and drop the found files into the proper folders that >> >> >> >> >> > way? >> >> >> >> >> > >> >> >> >> >> > Ronald wrote: >> >> >> >> >> >> Hi Bob, >> >> >> >> >> >> >> >> >> >> >> >> I have got the bunch of word documents, which names don't >> >> >> >> >> >> have >> >> >> >> >> >> names >> >> >> >> >> >> but >> >> >> >> >> >> machinery generated numbers instead. >> >> >> >> >> >> I have googled and tried following applications - File >> >> >> >> >> >> center, >> >> >> >> >> >> Turbo >> >> >> >> >> >> Browser, FilePreview and some others each of has required >> >> >> >> >> >> more >> >> >> >> >> >> or >> >> >> >> >> >> less >> >> >> >> >> >> time just to find out that these aren't up to the task. >> >> >> >> >> >> >> >> >> >> >> >> So finally I have returned where I started, that is the >> >> >> >> >> >> Word's >> >> >> >> >> >> own >> >> >> >> >> >> File >> >> >> >> >> >> Open Preview, which you also suggested ..... >> >> >> >> >> >> But results aren't much better - Word 2003 preview is >> >> >> >> >> >> capable >> >> >> >> >> >> to >> >> >> >> >> >> preview >> >> >> >> >> >> only some 20-30 files and then there starts to appear >> >> >> >> >> >> occasionally >> >> >> >> >> >> a >> >> >> >> >> >> text >> >> >> >> >> >> "Preview not available", after what I have to close Office >> >> >> >> >> >> and >> >> >> >> >> >> reopen, >> >> >> >> >> >> in >> >> >> >> >> >> order the preview to function again. On other PC where I >> >> >> >> >> >> installed >> >> >> >> >> >> Office >> >> >> >> >> >> 2007 open/preview doesn't work as expected at all, because >> >> >> >> >> >> Office >> >> >> >> >> >> 2007 >> >> >> >> >> >> keeps Previewed files open and I can't sort with drag and >> >> >> >> >> >> drop >> >> >> >> >> >> files >> >> >> >> >> >> to >> >> >> >> >> >> appropriate folders. >> >> >> >> >> >> >> >> >> >> >> >> Still I have an imagination, how work would flow, when >> >> >> >> >> >> there >> >> >> >> >> >> is >> >> >> >> >> >> an >> >> >> >> >> >> bug >> >> >> >> >> >> free photo album and slide show like document browser .... >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> "Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >> >> news:OqnqCXkXKHA.844(a)TK2MSFTNGP05.phx.gbl... >> >> >> >> >> >> >> >> >> >> >> >>>Seems that insufficient thought was given to naming the >> >> >> >> >> >>>documents. >> >> >> >> >> >>>What >> >> >> >> >> >>>is it you actually want to find by "browsing" a document? >> >> >> >> >> >>> >> >> >> >> >> >>>Ronald wrote: >> >> >> >> >> >>> >> >> >> >> >> >>> >> >> >> >> >> >>>>Hi Bob >> >> >> >> >> >>>> >> >> >> >> >> >>>>The same is available in Office 2003 and not sufficent >> >> >> >> >> >>>>for >> >> >> >> >> >>>>browsing >> >> >> >> >> >>>>700 >> >> >> >> >> >>>>documents named just by numbers. >> >> >> >> >> >>>>I have downloaded several appliocations which claim to >> >> >> >> >> >>>>offer >> >> >> >> >> >>>>required >> >> >> >> >> >>>>functionality but no luck, these are capable to0 open >> >> >> >> >> >>>>only >> >> >> >> >> >>>>50% >> >> >> >> >> >>>>of >> >> >> >> >> >>>>docs >> >> >> >> >> >>>>or so sloooow, that I have stopped evaluating. >> >> >> >> >> >>>> >> >> >> >> >> >>>> >> >> >> >> >> >>>> >> >> >> >> >> >>>>"Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >> >>>>news:uXVgBvhXKHA.3612(a)TK2MSFTNGP02.phx.gbl... >> >> >> >> >> >>>> >> >> >> >> >> >>>> >> >> >> >> >> >>>>>Open Word, clicl Office Button, click Open, Set the View >> >> >> >> >> >>>>>to >> >> >> >> >> >>>>>"Preview" >> >> >> >> >> >>>>>(icon in upper right of Open dialog) select file to >> >> >> >> >> >>>>>preview. >> >> >> >> >> >>>>> >> >> >> >> >> >>>>>Ronald wrote: >> >> >> >> >> >>>>> >> >> >> >> >> >>>>> >> >> >> >> >> >>>>> >> >> >> >> >> >>>>>>Hi >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>I installed Office 2007 in Trial mode but couldn't find >> >> >> >> >> >>>>>>any >> >> >> >> >> >>>>>>searched >> >> >> >> >> >>>>>>function. >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>Which Office 2007 part offers 1. a stepping through >> >> >> >> >> >>>>>>documents >> >> >> >> >> >>>>>>in >> >> >> >> >> >>>>>>one >> >> >> >> >> >>>>>>folder (like a slideshow) or 2. a folder documents >> >> >> >> >> >>>>>>album >> >> >> >> >> >>>>>>thumbnail >> >> >> >> >> >>>>>>preview mode? >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>Could you please be more precise? >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>Thanks! >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>"Bob I" <birelan(a)yahoo.com> wrote in message >> >> >> >> >> >>>>>>news:<e3uhtOZXKHA.408(a)TK2MSFTNGP04.phx.gbl>... >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>>>The trial version of Office 2007 is the latest >> >> >> >> >> >>>>>>>"viewer". >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>> >> >> >> >> >> >>>>>> >> >> >> >> >> >>>> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> >> > >> > >> > >> > > > >
From: Steve Rindsberg on 8 Nov 2009 18:33
In article <etojNjMYKHA.3600(a)TK2MSFTNGP04.phx.gbl>, Ronald wrote: > Hi Steve, > > Thanks for your help, you did a great work! You're very welcome. > I have been working and providing Windows PC support for 15 years and > problem or anomalies are nothing new. > Windows and Office never have provided too much of sureness, that's where > the problem is. > I sorted files manually. > > with BR > |