Results 1 to 9 of 9
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code: Sub cmd_OpenRecent()

    Winston,

    How about writing a set of routines that completely replaces the Word "recents" handler. I need control over every File>Open and the MRU list cannot be trapped.

    You could code these on the beaches, code them in the streets, code them...
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  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: Code: Sub cmd_OpenRecent()

    "Give me the job, and I shall furnish the tools" eh?

    OK.

    MRU lists ARE starting to bug me. That cute OpenVBE macro I've been using is clobbering both the MRU and the default file type (I like to keep mine as "all document types doc, dot, html".


    I can feel that I'm going to start doing my own MRU routines, most likely making use of my INI file routines if only to be sure I'm maintaining environment data where it won't get cloberred.

    <pre> SEND US YOUR SPECS!
    </pre>




    For example, I've felt that the File Open dialogue in ANY directory/folder could include the 3 MRU as a shortcut.

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code: Sub cmd_OpenRecent()

    Chris,

    I hope you do it. The ini file for storing the list is a good idea. You'll need to keep the list sorted by MRU. You should allow the user to set the number of entries -- as Word does now. That's easy for me because my users all share one global app with a UI that has a settings tab. I'll just add a MRU Entries spin control. You can't use the control on the Tools>Options>General tab because doing so turns on the Word MRU feature.

    Here are so other thoughts:

    1) Disable the Word MRUs.
    2) Use the File menu to list the file names, just like the real thing so the user doesn't have to think.
    3) Always keep the most recent on top.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

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

    Code: Sub cmd_OpenRecent()

    From time to time I find myself working on three documents at once. I like to fire up Word and have all three documents on my desk.

    The macro below makes use of the INI file routines.


    <pre>Sub cmd_OpenRecent()
    ' Procedure : cmd_OpenRecent
    ' Description: Open the more recent documents.
    ' By: Chris Greaves Inc.
    ' Inputs: None.
    ' Returns: None
    ' Assumes: Nothing
    ' Side Effects: Forces RecentlyUsedFileList to 9.
    ' Tested: By a call from the user.

    ' I can't think of a valid reason for having less than 9 files in the list.
    RecentFiles.Maximum = 9

    Dim intRecent As Integer ' Holds the real number of documents to be accessed.
    ' Obtain the value from the INI files; default is 3 most recent.
    intRecent = Val(strGp(strcApplication, strcApplication, "MostRecent", "3"))
    ' Make sure we are not asking for more than we have.
    If intRecent > RecentFiles.Count Then intRecent = RecentFiles.Count
    Dim inti As Integer
    ' Now loop. Note that we always ask for the oldest,
    ' as it then bumps the list downwards.
    For inti = 1 To intRecent
    RecentFiles(intRecent).Open
    Next inti
    End Sub
    </pre>


  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: Code: Sub cmd_OpenRecent()

    >1) Disable the Word MRUs.

    OK. What did you mean by this? What is a "Word MRU" if it's not what happens when I open a file?

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code: Sub cmd_OpenRecent()

    MRU: Most Recently Used.

    Disable this in Word, so YOUR MRU routine will not add *another* 9 file names to the File menu <img src=/S/nope.gif border=0 alt=nope width=15 height=15>


    Here, I'll give you the code. My contribution to the effort:

    Application.DisplayRecentFiles = False
    RecentFiles.Maximum = 0
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

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

    Re: Code: Sub cmd_OpenRecent()

    Kevin, thanks for this. I'm going to make a start as soon as I have Brooke to work testing my template encoder "What I did on my Hols".

    I did some thinking about it last night. There's going to be a tiered menu system allowing the user to drill down-and-out ad nauseum, with INI values to prune the branches of the tree, options to sort the tree (name, date, size, type) and new OPEN commands, one of which ought to be the super cmd_OpenVBE which i love so dearly. It'll be a place for my SaveAs rotines to hang out (saveasRtf, saveasTxt, ...)

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Code: Sub cmd_OpenRecent()

    Ok, great. As soon as you have something to test, post it so I can rip it to shreds. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

    Just kidding. But you do have to make sure your #1 inspiration for this project is completely satisfied, no?

    Did you get my OpenVBE update? I didn't hear from anyone after posting that. And since then, I've made it even better. Let me know if you'd like to see it.

    Look forward to testing crRecents! or crMRU or...

    (I've got a few users who can help with the testing too)

    p.s. I'll let you get the show going, but I might contribute some code to the project too (besides the OpenVBE update), if you don't mind.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

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

    Re: Code: Sub cmd_OpenRecent()

    Yup, thanks, I got (and saved) the code. By now you will have the real-simple draft. I have done some more work on (and got more questions on) the menubar controls. I'm going to bed.

Posting Permissions

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