Results 1 to 12 of 12
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Versions of Applications (Word/Excel, all version

    What a devilish trick to display another MSKB number than your link refers to!
    The MSKB article suggests a way to start a specific version, but this requires you to know the installation path for each version. If you do, you can also start the exe directly, then use GetObject to get an object reference.
    Reading the user's registry is probably simpler!

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #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: Versions of Applications (Word/Excel, all vers

    > What a devilish trick to display another MSKB number than your link refers to!
    Computers were never my strong point, but I didn't expect such a simple typo to take down the lounge for 24 hours (grin!). Fixed. (I hope, on both counts)

    > but this requires you to know the installation path for each version
    Right. And at this stage of the game I begin to suspect that I'd have to trawl the registry anyway.

    I'm prepared to do the registry trick, but thought to wonder if anyone had found an alternate, non-registry method.
    Once I'm in there, I'll probably mine even more data, MyPlaces is always fun.

  4. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Location
    Zoetermeer, Zuid-Holland, Netherlands
    Posts
    559
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Versions of Applications (Word/Excel, all vers

    Thanks for sharing Chris.

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> From your comments in Sub TESTLoopAndAppend I gather that you collect only Excel 9 files... <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

  5. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Versions of Applications (Word/Excel, all vers

    The ONLY way that multiple versions of OFFice can FULLY peacefully co-exist is if each is installed in a separate OS.

    Then you code has to use early, or late, binding to run the code in each OS.

  6. #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: Versions of Applications (Word/Excel, all vers

    > Then your code has to use early, or late, binding to run the code in each OS.
    I can see this, now, and if I understand you, you are referring to my earlier method of obtaining the list of Recent Files from the application itself ("xlApp.RecentFiles.Count").

    I now see that trick as a somewhat expensive mechanism - even if the "CreateObject("Excel.Application.10")" trick worked; it required me to load a copy of each version of the application in turn. And for this specific application (Recent Files) in Word and Excel with four versions of each, made for 7 fresh application launches, assuming I made use of the existing host application.

    I have not performed any timing runs, but I suspect that reading data from the registry is way faster than loading an application with its peta-bytes of attendant DLLs. In other words, my RecentFiles.Count trick was sufficient to let me see that the idea had merit, but The Registry is a better way to go.

    My code for reading the registry and parsing keys is not the best I can do. I came across some VB code which I thought obtained all the data in a sub-tree. That would reduce me to one registry call followed by some high-speed string parsing, but I will observe the revamped MRUse during the next week to see if I can spot a speedup.

    If the revamped version is faster using the registry, then I'm a winner, because the original version polled only the current Excel & Word for RecentFiles.Count, whereas the revamped version polls all 2x4 combinations from the registry. (2x5 actually, since I do everything from 8.0 through 12.0 on principle, although I have only 4 versions installed on the laptop). That is, I'm harvesting from four versions in less time than it took to harvest from two.

    Yaaaaaaaaaaay for the registry!

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

    Re: Versions of Applications (Word/Excel, all vers

    (Before anyone asks, I'm saying "2007" to distinguish my Beta2 copy from the real Office12, due out Real Soon Now(tm)

    > I gather that you collect only Excel 9 files...
    Er, no. The Word2000/VBA run collected only Excel9.0 files. The comment was placed there as soon as I realised that no matter what I did, I got ONLY Excel9 files. Then I started investigating. In fact my MRUse collects Word and Excel files; I see no reason why I shouldn't be able to open my Expenses workbook from within the Word report I'm writing.

    With 4 versions of Office loaded loaded I had already noticed that after running Word2007 any attempt to run Word2000 resulted in the ten-second "Looking for target" flashlight thingy. I now think this is because somehow a shortcut link is told it is 2000 but finds 2007 in the registry, so must first "repair" the registry before carrying out my instructions.

    I could augment each of the 4 batch files (one for each version of Word) with a call to one of four carefully saved *.REG files, to save time by repairing the registry before Windows tried to repair it, but I can't be bothered.

    I found the exploration of registry entries fascinating on this subject.

    The MRU limitation of 9 entries has annoyed me since I was weaned. I could see no valid logical reason for it, but guessed it was programmer-laziness. The SZ_entries confirm this, and that is why I wrote my MRUse. I see that Office2007 uses MULTI_SZ with a CHR$(0) delimiter, which would have been a better design from the get-go.

    I note too that EXCEL MRU's are now classified into "Browse", "Open", "SaveAs" while PPT MRUses(?) include fancifuls such as "Insert Picture" and "Insert New Pictures" (note the plural!). Word includes "Attach Template", "Link to File" and seven others as I speak. Who knows what will climb in there now that the doors have been left wide open.

    I recommend a quick look in RegEdit (summary attached), and now you will understand why, to Hans, I pondered if "anyone had found an alternate, non-registry method.". I can see my weekend slipping away again, and it's only Thursday ... (grin!)

  8. #7
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Versions of Applications (Word/Excel, all vers

    Developing for multiple version requires TESTING all the versions, but developmencan be done in ONLY the earliest version.

    Of course, I do things backwards, and develop in the latest version, then build and test in earlier versions, but then I am a masochist and enjoy the challenge.

    DEveloping for multiple versions means one has to have either a multiboot system, or use some virtual system.
    Trying to make multiple versions of Office FULLY coexist is not possible, if only due to the problem with shared files and the limitation on having only 1 version of Outlook.

    Not to mention that most users will have a single version of Office, so you do not want to test a hybrid that relatively few users will have.

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

    Re: Versions of Applications (Word/Excel, all vers

    Howard, thanks for the comments, and yes, we are still on topic in the thread (grin!)

    > development can be done in ONLY the earliest version.
    I dispute this. A year ago armed with 97 & 2002 I developed in 97 and tested briefly in 2002, anticipating no problems. Now armed with all 4 versions I tend to develop in 2000 or 2003 - whichever happens to pop up, and sometimes effect fixes to common library templates in 2007beta2 with no apparent side effects. I say "no apparent" because a fix to a utility library such as UW.DOT made with 2007 is immediately available to all my applications that use UW.DOT from the common startup location C:GreavesStartupWORD regardless of the version being used at any time. InStrRev is a problem as are a couple of other newer fucntions, but I tend to spot these and write my own code if I really want to continue supporting 97.
    At any rate, I've had 97, 2000 and 2003 co-operating peacefully for a year and added 2007 about 3 months ago, with no harmful effects. Again, i am probably performing 90% of my on-the-fly fixes in 2000, which is for most purposes the oldest system I run on a regular basis, but on purpose I have made changes via 2007 just to see what happens. See? You are not the only masochist in this world!

    >one has to have either a multiboot system, or use some virtual system.
    Again, I question this. I have neither multiple boots nor virtual systems. Just 2GB RAM and 100GB hard drive. I loaded the versions in sequence 97, 2000, 2003, 2007 and away I went.
    Excepting for the registry problems noted in the KB article above, there is no harmful effect that I can see in running mu;ltiple versions. I am greatly surprised by this, especially since by my nature I am inclined to be doing things that the average user doesn't even know to think about. That is, I am doing on-the-fly installs, cleaning deadwood out of projects, using libraries and powerful engines from templates, invoking Excel, Access and PPT from within Word and making them all share their data properly, etc.

    > most users will have a single version of Office, so you do not want to test a hybrid that relatively few users will have.
    Well yes, and no.
    I agree that most users will have but one version of, say, Word, but then I have many users. Today the call is from someone running 2000, yesterday 2002 or 2003, and so I want to make sure that the general-purpose applications run for each person who might want to run them. A major client last year, partway through development of a document management system announced migration fro 2000 to 2003. I must be able to jump through those hoops before the client commits to the change, otherwise I end up with a ragged project.

    This thread started with the premise "I am trying to grab data from all 4 installed versions:", and that has to be a valid technique even if every one runs only one version of Word. In this case I'm hunting for Recently Used Files. That data is held in the registry by Office version number. Any utility that claims to be able to obtain data for any version ought to be able to obtain that data from the registry. Writing code that samples every version, and comes up empty-handed for non-existent versions, seems like a valid solution to the problem, to me. In this case it would be, and was, possible to obtain the Recent Files data through xlApp.RecentFiles, but that is true only for Recent Files and a few other VBE interface data. I believe that in general, the registry data is not available through an application object such as xlApp.

  10. #9
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Versions of Applications (Word/Excel, all vers

    <hr>> development can be done in ONLY the earliest version.
    I dispute this. A year ago armed with 97 & 2002 I developed in 97 and tested briefly in 2002, anticipating no problems. Now armed with all 4 versions I tend to develop in 2000 or 2003 - whichever happens to pop up, and sometimes effect fixes to common library templates in 2007beta2 with no apparent side effects. I say "no apparent" because a fix to a utility library such as UW.DOT made with 2007 is immediately available to all my applications that use UW.DOT from the common startup location C:GreavesStartupWORD regardless of the version being used at any time. InStrRev is a problem as are a couple of other newer fucntions, but I tend to spot these and write my own code if I really want to continue supporting 97.
    At any rate, I've had 97, 2000 and 2003 co-operating peacefully for a year and added 2007 about 3 months ago, with no harmful effects. Again, i am probably performing 90% of my on-the-fly fixes in 2000, which is for most purposes the oldest system I run on a regular basis, but on purpose I have made changes via 2007 just to see what happens. See? You are not the only masochist in this world!<hr>

    READ the MSFT KB articles. They are mealy mouthed, but do point out the potential conflicts.
    If you have encounterted none, you've been lucky.
    But to send such critters to others, who have different configurations, is just asking for trouble.

    <hr>
    >one has to have either a multiboot system, or use some virtual system.
    Again, I question this. I have neither multiple boots nor virtual systems. Just 2GB RAM and 100GB hard drive. I loaded the versions in sequence 97, 2000, 2003, 2007 and away I went.
    Excepting for the registry problems noted in the KB article above, there is no harmful effect that I can see in running mu;ltiple versions. I am greatly surprised by this, especially since by my nature I am inclined to be doing things that the average user doesn't even know to think about. That is, I am doing on-the-fly installs, cleaning deadwood out of projects, using libraries and powerful engines from templates, invoking Excel, Access and PPT from within Word and making them all share their data properly, etc.<hr>
    READ the MSFT KB articles. They are mealy mouthed, but do point out the potential conflicts.
    If you have encounterted none, you've been lucky.
    But to send such critters to others, who have different configurations, is just asking for trouble.


    <hr>> most users will have a single version of Office, so you do not want to test a hybrid that relatively few users will have.
    Well yes, and no.
    I agree that most users will have but one version of, say, Word, but then I have many users. Today the call is from someone running 2000, yesterday 2002 or 2003, and so I want to make sure that the general-purpose applications run for each person who might want to run them. A major client last year, partway through development of a document management system announced migration fro 2000 to 2003. I must be able to jump through those hoops before the client commits to the change, otherwise I end up with a ragged project.<hr>

    Of course, but you arte just asking for trouble.

    <hr>This thread started with the premise "I am trying to grab data from all 4 installed versions:", and that has to be a valid technique even if every one runs only one version of Word. In this case I'm hunting for Recently Used Files. That data is held in the registry by Office version number. Any utility that claims to be able to obtain data for any version ought to be able to obtain that data from the registry. Writing code that samples every version, and comes up empty-handed for non-existent versions, seems like a valid solution to the problem, to me. In this case it would be, and was, possible to obtain the Recent Files data through xlApp.RecentFiles, but that is true only for Recent Files and a few other VBE interface data. I believe that in general, the registry data is not available through an application object such as xlApp.<hr>

    If you want code to run on several versions, you have to do it the correct way.
    I'll say no more.

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

    Re: Versions of Applications (Word/Excel, all vers

    Allright, you've lost me here.
    Are you saying that anyone running 4 versions of Office on one OS is in trouble?
    I've been running and using 97/2000/2003/2007beta since early July.
    I do everything that (I feel) 99% of end-users do, and more, since I provide tools for end-users, not least in the form of macros.
    I run any one of the versions of Word at any time I choose; sometimes two or more; I currently have opened four copies of a single document in four versions of Word (three copies obviously read-only), all opened via separate entries in my SendTo menu.
    With the obvious exceptions of trying to run InStrRev and its cousins in Office97, I have experienced no harmful after effects, and my Office2007User and Office2007Developer blogs document this.
    I have had teething troubles with 2007, but both it and I are in Beta versions (grin!).

    Here's what happens to me: I'm working on whatever I'm working on; my 'phone rings and someone says "I can't find out how to do this in Word2003 (or Excel 97 or PowerPoint 2000 ...). I fire up the appropriate version of the application and resolve the caller's problem.
    I don't find myself in trouble at all.
    Ever.
    The caller thanks me and rings off.
    Whatever version of Word I happen to be in, I load my billing spreadsheet from my custom MRUse list (the example chosen at the start of this thread), log the users's call, and get on with my life, such as it is.

    I know you've said "I'll say no more.", but please do respond.
    Tell me if I've missed something here.
    Am I not experiencing problems when I ought? (I was always the last one to know)
    How come I'm not seeing a litany of conflict problems in other Office2007 user/developer blogs?

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

    Re: Versions of Applications (Word/Excel, all vers

    <P ID="edit" class=small>(Edited by chrisgreaves on 13-Sep-06 13:04. More knowledge)</P>I bit the bullet and used the following registry keys:
    <table border=1><td valign=top>Office version</td><td valign=top>Registry path</td><td valign=top>Key type</td><td valign=top>Key data</td><td valign=top>12.0</td><td valign=top>HKEY_CURRENT_USERSoftwareMicrosoftOffic e12.0CommonOpen FindMicrosoft Office ExcelSettingsSave AsFile Name MRU</td><td valign=top>Reg_Multi_Sz</td><td valign=top>CHR$(0) delimiter</td><td valign=top>11.0</td><td valign=top>HKEY_CURRENT_USERSoftwareMicrosoftOffic e11.0ExcelRecent Files</td><td valign=top>Reg_Sz</td><td valign=top>File1 through File9</td><td valign=top>10.0</td><td valign=top>HKEY_CURRENT_USERSoftwareMicrosoftOffic e10.0ExcelRecent Files</td><td valign=top>Reg_Sz</td><td valign=top>File1 through File9</td><td valign=top>9.0</td><td valign=top>HKEY_CURRENT_USERSoftwareMicrosoftOffic e9.0ExcelRecent Files</td><td valign=top>Reg_Sz</td><td valign=top>File1 through File9</td><td valign=top>8.0</td><td valign=top>HKEY_CURRENT_USERSoftwareMicrosoftOffic e8.0ExcelRecent File List</td><td valign=top>Reg_Sz</td><td valign=top>File1 through File9</td></table>The attached Text file is the Module that calls registry functions; it gives a view of the logic I used to assemble Recent Files from various versions of Excel on this and other machines.

    Note the three separate entries for Office12 (Browse, save As, Open). In Office 12 each application has application-specific items that must be ferreted out.

    (later)
    In expanding this work from Word & Excel to PPT I made a common utility function that took the name of the ap ("Word", "Excel", "PowerPoint") as used in the registry.
    Then I found that for Office 8.0 onwards, PowerPoint has used "Recent File List" consistently, whereas Word & Excel have used "Recent Files". Another Trap For Young Players.

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

    Versions of Applications (Word/Excel, all version

    <P ID="edit" class=small>(Edited by chrisgreaves on 16-Dec-06 07:43. Include forward link to new findings)</P>(See also <post:=620,636>post 620,636</post:>)

    (A very old thread) "Re: Understanding XL Ref in VB6 ..?? (vb6 XL various versons) re: 82,556 from dingo" <post#=83240>post 83240</post#>

    I have installed, on one computer, Offices 97, 2000, 2003 and 2007beta.
    (Very well, thank you!)

    I am trying to grab data from all 4 installed versions:<pre> Dim xlApp As Excel.Application
    Set xlApp = CreateObject("Excel.Application") ' gets me 9.0, but I want all!
    Dim lng As Long
    For lng = 1 To xlApp.RecentFiles.Count
    Dim strFullName As String
    strFullName = xlApp.RecentFiles(lng).Path</pre>

    The code quoted gets me Office 9.
    The thread quoted above suggests in part "you could change your code to CreateObject("Excel.Application.9") and CreateObject("Excel.Application.10") ", but this does not work (from Word2000, at any rate).

    kb 292491 says in part "A common perception for Office Automation when you have multiple versions of Office installed on a system is that you can dictate which version loads by using a specific version-dependent PROGID (for example, that "Excel.Application.9" loads Excel 2000, "Excel.Application.10" loads Excel 2002 and "Excel.Application.11" loads Office Excel 2003). However, this is not correct. Excel 2000, 2002, and 2003 share the same CLSID, so the version that loads with these PROGIDs depends solely on which version was last installed.".

    Does anyone here know a way of cycling through separate versions of a single office Ap (e.g. all installed versions of Word) without diving into the end-user's registry?

Posting Permissions

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