Newsgroups: microsoft.public.word.vba.general
Von: Russ <drsN0SPAMmi...@hotmailD0Tcom.INVALID>
Datum: Wed, 04 Jul 2007 15:05:01 -0400
Lokal: Mi 4 Jul. 2007 21:05
Betreff: Re: code to move files created between two dates to folder B?
Gil,
I also found this code snippet with Google and modified it to return Creation Date of a file. (Note: .dll will not work in MacWord) http://officeone.mvps.org/vba.html I haven't tested in WinWord because I'm using MacWord 2004 at home. You may have the function return a value as a string or date. Function GetDateCreated(ByVal FileName As String) As Date Set DSO = CreateObject("DSOleFile.PropertyReader") If the function returns as a date you can use the datediff() function to > Gil, -- > This will work very quickly in WinWord docs to extract document properties. > http://word.mvps.org/FAQs/MacrosVBA/DSOFile.htm > One of the document properties is for creation date. >> or something like: >> Dim strDefFilePath As String, strFileToCopy As String >> strSourcePath = "c:\Patients\AMR\" >> strSourcePath = "" ' identify folderA >> ' ... but it needs to move over up to 10 jpg files >> :) >> "gil" <gil...@bellsouth.net> wrote in message >> ? Possibly something like: >> Dim date1 As String >> date1 = Selection.Text >> ' navigation code to new selection >> Dim date2 As String >> date2 = Selection.Text >> Dim folderA As String >> ' identify folderA >> Dim folderB As String >> ' identify folderB >> ' ??? Object.MoveFile Source, Destination >> WordBasic.CopyFileA folderA ?? FileName:= ??, Directory:=folderB >> Cheers & tia >> Gil Russ drsmN0SPAMikleAThotmailD0Tcom.INVALID Sie müssen sich anmelden, bevor Sie Nachrichten veröffentlichen können.
Bevor Sie eine Nachricht posten können, müssen Sie zunächst dieser Gruppe beitreten.
Bitte aktualisieren Sie vor dem Posten in den Abonnementeinstellungen Ihren Spitznamen.
Sie haben nicht die erforderliche Berechtigung zum Posten.
| ||||||||||||||