Limit FileSearch to Files of certain date? 
Author Message
 Limit FileSearch to Files of certain date?

How do I limit FileSearch to files (documents) that were created (or
otherwise last modified) on a certain date? I can't use .TextOrProperty,
because then the date has to be passed as a fixed string. The date is
variable and will be determined in the same macro. I am using Word 2000.
Thanks for any help.

RBS



Sat, 14 Sep 2002 03:00:00 GMT  
 Limit FileSearch to Files of certain date?
Hi RB,

You can pass a string variable containing a formatted date to
.TextOrProperty, unless there is something I have missed.

Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email

Quote:

>How do I limit FileSearch to files (documents) that were created (or
>otherwise last modified) on a certain date? I can't use .TextOrProperty,
>because then the date has to be passed as a fixed string. The date is
>variable and will be determined in the same macro. I am using Word 2000.
>Thanks for any help.

>RBS



Sun, 15 Sep 2002 03:00:00 GMT  
 Limit FileSearch to Files of certain date?
Hi Jonathan,

Yes, you are right. I was still passing it as a date.
Still this solution is not ideal. I am not interested in the text, just the
properties. Looking at the text slows the macro down a lot. Is there no way
I can search the files with a particular date in the property?
Thanks for the help.

RBS



Sun, 15 Sep 2002 03:00:00 GMT  
 Limit FileSearch to Files of certain date?
Hi RB,

The following code, taken from the PropertyTests Collection Object entry in
Word VBA Help, might point you in the right direction.

Set fs = Application.FileSearch
fs.NewSearch
With fs.PropertyTests
    .Add Name:="Files of Type", _
    Condition:=msoConditionFileTypeWordDocuments, _
   Connector:=msoConnectorOr
    .Add Name:="Last Modified", _
    Condition:=msoConditionAnytimeBetween, _
    Value:="1/1/96", SecondValue:="6/30/96", _
    Connector:=msoConnectorAnd
End With

Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email

Quote:

>Hi Jonathan,

>Yes, you are right. I was still passing it as a date.
>Still this solution is not ideal. I am not interested in the text, just the
>properties. Looking at the text slows the macro down a lot. Is there no way
>I can search the files with a particular date in the property?
>Thanks for the help.

>RBS



Sun, 15 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. procedure to find certain files from a certain date on harddisk

2. List of files modified before a certain date

3. Find files updated after certain date in a folder

4. API calls to search for files between certain dates

5. Text edit control that limits input to certain chars

6. Database expires after a certain date

7. Open the Calendar at a certain date

8. delete records that are older than a certain date

9. How to select FileSearch File Type?

10. How to delete a file after finding it with FileSearch Object

11. Stop FileSearch when a file is found

12. Exclude files from FileSearch

 

 
Powered by phpBB® Forum Software