Results 1 to 6 of 6
  • Thread Tools
  1. 2 Star Lounger
    Join Date
    Jun 2001
    Location
    York, Pennsylvania, USA
    Posts
    160
    Thanks
    0
    Thanked 1 Time in 1 Post

    Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    Folks,

    Our Systems people have started rolling out new PC's with Windows XP and Office 2007 installed. Unfortunately there a couple of us developers with various template projects developed under Word 2003 and Windows 2000. The code in the templates work with a number of 'boilerplate' documents that have the attached template set to the working template (2003 version).

    We're getting a couple of run-time errors under Windows XP and Word 2007:

    1) unable to open document - invalid network drive specified' using UNC file specs. The network drive is readily accessible using Windows explorer. If you go into debug and step through the documents.open command, the document opens.

    2) Another project has Access 2003 launch a Word document, with code in the attached template that runs from the AutoOpen sub. With this project we get a run-time error 'unable to run the specified macro'. Yet we can open the template and see the macro. Everything is Public, etc. and worked fine in the last couple of versions of Word.

    Word 2007 is set to run in compatibility mode.

    Are there issues running 2003 templates and documents in 2007?

    We still have to support 2003 on Windows 2000 since the corporate-wide roll-out isn't for some months yet.

  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. 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: Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    I only have Office 2007 on a personal laptop, so I have little experience with it.

    On #1, it's frustrating when single-stepping solves a problem... How is this procedure triggered? Is it possible that Word or Windows usually is doing something else that is somehow interfering with access to the network drive/?

    On #2, how are you launching the document? For example, shell execute versus automation.

    <hr>Word 2007 is set to run in compatibility mode.<hr>
    I'm not sure what that means -- where is that set?

  4. 5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    648
    Thanks
    3
    Thanked 16 Times in 15 Posts

    Re: Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    It's not actually set anywhere -- it just happens.

    When 2007 opens an older document, it automatically opens it in Compatibility Mode. When you save it, 2007 automatically saves it back to its original format. You must specifically Save As a 2007 document (or use convert on the Office Button Menu with the doc open). Because this changes the extension to docx, it preserves your old document.

    To save a template so it's not in compatibility mode, save as to .dotm format if it has macros, dotx if it doesn't. Although I've had no problems running templates in compatibility mode, some features of Word 2007 are not available until you convert.

    Kim <img src=/S/bananas.gif border=0 alt=bananas width=33 height=35>
    Attached Images Attached Images

  5. 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: Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    Thanks for the clarification. I thought it might be more far-reaching than the document format. (Wishful thinking, perhaps.)

  6. 2 Star Lounger
    Join Date
    Jun 2001
    Location
    York, Pennsylvania, USA
    Posts
    160
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    Right now, I'm kinda thinking the problems are perhaps due to third party software (Norton Antivirus comes to mind), something in the 'new' WinXP versus our old Windows 2000 settingwise or something. A number of templates are affected and it seems curious that they work just fine on our current Windows 2000 and Office 2003 platforms.

  7. Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,608
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Word 2003 VBA vs Word 2007 VBA (VBA Word 2007)

    One item that caught me; Office 2007 has done away with Office Assistant, so any code which used the Assistant to communicate with the user needs to be converted to MagBox.
    Regards
    Don

Posting Permissions

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