#1
|
|||
|
|||
Treversing directories and open WORD-docs ???
I'm treversing files in a folder and its sub-folders by using DIR in Access VBA.
I need to search 1000's of WORD-documents for a inserted link (one link at a time) - I have a function for that and that function needs the document to be OPEN - so I ran into see 3 problems here: 1) to open the document I need the PATH to the filename and the DIR only gives me the filename - is there a trick to let DIR give me the PATH too ? 2) It seems like DIR is NOT treversing into the SUB-folders - how can I force it to do that ? 3) I think I have to open WORD HIDDEN, then do the search and CLOSE WORD again - I know I have 1000's of WORD files and I fear it wil take a very long time to do that search - is there a better/faster method ? To maybe find a better method I did some testing of 3) and found out in Windows - I just opened a folder with WORD-documents or in some subfolders in it and filled the search field with a text I KNOW is used in a link in some of the documents - very, very, very fast the search result came up !!!!!!! I can get the "search text" in the field left to the search field and it look something like this: search-ms:displayname=Søg%20efter%20resultater%20i%20Slæg tsforskning_V4&crumb=filnavn%3A~<spiseis.KMZ%20ELL ER%20System.Generic.String%3Aspiseis.KMZ&crumb=location:C%3A%5CUsers%5Cksor%5CDocuments%5C Slægtsforskning%5CSlægtsforskning_V4 and I can "re-search" (= do the search again) if I just insert the search sting in the "address line" and it's very, very fast !!!!!!!!! There is a sort of solution as an addin to WORD, but I just want that plain and simple function returning false or true if the link is found or not - I like Occams Razor (very early KISS !) : Document Batch Processes How can I construct and use this same "search function/string" from within my Access VBA code to get a TRUE or FALSE if the link I search for (here spiseis.KMZ) is used or not ? Last edited by ksor; 10-15-2019 at 04:20 AM. Reason: More infos |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cannot open older Word docs | chas1308 | Word | 5 | 05-20-2018 01:40 AM |
Can't open Word docs on server | macdude425 | Other Software | 3 | 12-06-2016 01:37 PM |
Word shuts down when trying to open certain docs | lesliejames | Word | 0 | 01-19-2015 11:36 AM |
Word 2007 docs always open as Calibri | Jackpine | Word | 11 | 11-03-2010 06:23 PM |
Use an "open" dialog box for selecting directories | rnstewart | Excel | 1 | 11-28-2005 06:24 PM |