Results 1 to 5 of 5
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Dynamic daily options (Word/XP et al.)

    Yes, ZoomBrowser is consistent with the folder naming. But aren't each of these images going to be rather gigantic? You might want to use IrfanView or another program with batch processing capabilities to downsize the images into another folder (or a subfolder) and then pick them up from there with your VBA procedure.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic daily options (Word/XP et al.)

    > ZoomBrowser is consistent with the folder naming

    Right.. The technique will work with any system that is consistent. I have a C:Blotter in which gets created at first-boot-of-the-day a daily folder, thus, today, "C:Blotter20050601". I could use the code to force default saves from Word into the "desktop blotter" (remember those?), and then only move out the stuff that is really worth keeping.


    On a different matter:
    >But aren't each of these images going to be rather gigantic?
    With my photos/movies, I quickly move those related to the battle with the landlord to "C:PersPlaces311WestMallTSL71309", those for my niece and son to "C:PersPeopleDavid", and the rest are not worth keeping, so once their volume rises above, oh, say 0.002% of my hard drive, I can trash them.

    On top of all that, my daily first-boot procedure backs everything up to a removable IDE drive, so i don't mind deleting "stale" daily folders - they are well-and-truly saved.

    > IrfanView or another program
    Yes, I installed "ImageResizerPowertoy" which does a good job of chopping cats down to size suitable for a phot-albumn.

    Anyway, I'd better get back to some VBA coding ......

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dynamic daily options (Word/XP et al.)

    So, say, for example, you'd just bought a digital still/movie camera and had a cat, and you wanted to compose a daily diary of goings-on. Such as those here

    You'd want to Insert Pictures from File, but from a different folder each day, right? (because the camera d/ls into a folder named as today's date).
    <pre>Sub autoexec()
    Dim strPath As String
    strPath = Options.DefaultFilePath(Path:=wdPicturesPath)
    ' = "C:PersCanon2005_06_01"
    Dim lngNode As Long
    lngNode = InStrRev(strPath, "")
    strPath = Left$(strPath, lngNode)
    If LCase(strPath) = "cerscanon" Then
    strPath = strPath & Format(Date, "YYYY_MM_DD") & ""
    If Len(Dir(strPath & "NUL")) > 0 Then
    Options.DefaultFilePath(Path:=wdPicturesPath) = strPath
    Else
    End If
    Else
    End If
    End Sub</pre>


    Of course, this type of thing applies to those who write poetry, or whose work depends on a different set of templates according to the day-of-the-week, and so on.
    To be truly robust, I should be checking that the leading portion of the path is still "C:PersCanon", otherwise I'm done taking pictures, and shouldn't be advancing to the next folder.

    (edited to include a test for existence of the path (I may fire up Word BEFORE I've made the day's first d/l))

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Dynamic daily options (Word/XP et al.)

    hi Chris,

    Of course, if you're doing this in Word and the path remains the same except for the date, you don't need vba - you can do it all with field coding:
    {INCLUDEPICTURE "C:/Pers/Canon/{DATE @ "YYYY_MM_DD"}/Pic0001.jpg"}

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Dynamic daily options (Word/XP et al.)

    > you can do it all with field coding:

    Yes. Except for the bit about browsing to the required picture.

    As an example: tomorrow I'll start a new document, and I will want to populate it with pictures from 2005_06_03; I'll want the Insert, Picture, File dialog to assume ..2006_06_03 as the default folder for images, and it is from there I'll select one, two or more images to paste into "today's" album page.

    It's the setting of the default folder (Tools, Options, Locations, ...) to today's date that makes it useful, at least, that was meant to be my central thrust.

    The example I chose just happened to be Including Pictiures, but could as easily have been Saving Documents. The coding principle is the same.

    I'm beginning to wish I'd never bought the camera .... (just kidding; I'm delirious!)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •