Page 1 of 2 12 LastLast
Results 1 to 15 of 22
  1. #1
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA disappeared! (Word 2003 VBA)

    HELP!! I will have hated to lose all this work!. I was working on a Word 2003 template and using VBA to automate, I'd been working on it a couple of hours and now when I go into the VBA Editor, I cannot see the project at all! I see the Normal.dot and a few others, but not the one I was working on. If I go to Tools, Macros, Edit Macros, I cannot get in that way either. Could I have accidently "hidden" it? <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    Is the template open in Word itself? If so, save it, then quit and restart Word, and reopen the template. Hopefully, you can see the project in the Visual Basic Editor again.

    Or did you hide the project explorer? You can use View | Project Explorer to show it.

  3. #3
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    I did that, and completely rebooted my computer. I'm not getting any error messages at all. Although there is an AutoNew macro that does not run when new document created from this template. The strange part is there is NO reference to this project in the Editor????

  4. #4
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    PS, no I didn't hide the Project Explorer... I can see "normal.dot"

  5. #5
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    More Info: I tried to add the template through "Tools, Templates and Add ins" and got the following error message: "This error is usually due to insufficient memory or low disk space.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    I'm sorry, I have no idea. It is possible to lock a project for viewing, but the project itself will (or should) still be listed in the Project Explorer in the Visual Basic Editor.

    If you wish, you can attach a zipped copy of the template so that others can try to find out what's wrong, but if your code is proprietary that would be a problem, since you can't edit it...

  7. #7
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    Here it is... for what it's worth! All that work lost! #$%^&&*(&^$#$%)(*(**&*&%^^$%$#%$@#
    Attached Files Attached Files

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    It seems the VBA project in the template is damaged beyond repair. Saving as .html didn't help.

    You can recover some or perhaps most of the code by opening it with the "Recover text from any file" option. Amidst a lot of useless text, you'll find pieces of VBA code. You won't be able to recover userforms this way, however.

    For the future: make backups frequently while working on an important document or template!

  9. #9
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    My stomach hurts! I backup every day, but that doesn't help in this case, does it? Thank you for your time. I do appreciate it. <img src=/S/bwaaah.gif border=0 alt=bwaaah width=123 height=15>

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    I feel your pain - it is extremely unpleasant when this happens (usually when a deadline nears).

    Unfortunately, a daily backup won't help to recover work you've done today. I'd try the "Recover text from any file" option, even if you can't retrieve all code, you won't have to start from scratch again. Good luck, and save intermediate copies while reconstructing the code!

  11. #11
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    Where do I find "Recover Text from any file"?

  12. #12
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    Make sure the template is closed.
    Select File | Open...
    Click the drop down list labeled Files of type and scroll down until you see "Recover text from any file".
    Select this option.
    Browse to the template, and open it.

    See How to recover text from any files by using the "Recover Text from Any File" converter of Word 2002 and Word 2003

  13. #13
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    For what it might be worth, here is a file containing all the "identifiable" ascii text I could extract using BinText v3.0. I certainly hope you can salvage something from it.

    Alan
    Attached Files Attached Files

  14. #14
    2 Star Lounger
    Join Date
    Mar 2004
    Location
    Portland, Oregon
    Posts
    173
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA disappeared! (Word 2003 VBA)

    Thank you. I guess I'll bite the bullet and dig in. <img src=/S/flatcat.gif border=0 alt=flatcat width=61 height=21>

  15. #15
    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: VBA disappeared! (Word 2003 VBA)

    <P ID="edit" class=small>(Edited by jscher2000 on 11-Oct-05 09:39. )</P>Maybe this will improve the flavor of the bullet.

    Opened file in StarOffice 6.0. Copied each code module to a blank Word doc. Did a Find/Replace for Rem (and trailing space) to nothing. Saved as text. See attached.

    Added: I just noticed that StarBasic added a Sub [ModuleName] and End Sub around the contents of each module. Obviously VBA isn't going to like that, but it should be easy to remove. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Attached Files Attached Files

Page 1 of 2 12 LastLast

Posting Permissions

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