Results 1 to 9 of 9
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Non-existent macro (Word 2000)

    Lately I've been monkeying around with the VBA editor and trying to learn VBA. Somehow I've managed to create a macro in an existing Word document. When I open the document, the first thing I see is that little message telling me the document "contains macros" and warns me of the dangers of playing with macros. Funny thing, though--I open the document and check for macros to delete, but I can't find any! Looked in the organizer, too...ain't none! So...this is a minor nuisance, but (a) how might I have put a ghost macro into this document and ([img]/forums/images/smilies/cool.gif[/img] how do I get it outta there?
    <img src=/S/dizzy.gif border=0 alt=dizzy width=15 height=15>

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Posts
    3,788
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Non-existent macro (Word 2000)

    You need to start VBA editor and remove any modules (it is probably called module1).
    Right click on the module name within project explorer and select Remove Module1... (or whatever your module is called)
    If project explorer is not displayed activate it by pressing Ctrl+R

  3. #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: Non-existent macro (Word 2000)

    If you find nothing in ThisDocument and there are no code modules, class modules, or forms, it could be a mystery. I vaguely recall that the warning could pop up in Word 97 if there are certain other customizations in the document, although I can't remember exactly what they were, and I don't know if this carried over to Word 2000. Anyone have any idea what I'm talking about?

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Non-existent macro (Word 2000)

    It is possible to have a document with the macros deleted but still thinking that the macros are still there. Woody has discussed this in WOW I think around about 8-10 months ago. This WOW from the archives http://www.woodyswatch.com/office/ar...ate.asp?v2-n12 mentions a case but there is another WOW Virus Alert somewhere where the reverse could happen. From memory the description said that there is a specific bit embedded the document metadata that tells Word that there are macros attached. The security levels function checks for this bit when opening the files. It is possible for this bit to be out of synch with the actual existence of macros in the file hence allowing a hacker to create a macro that is available to run in Word even though the application doesn't notice it is there when it should - at opening.

    The quick fix is to copy the content from that out-of-synch file into a new empty document. Make sure you copy the styles as well and the final section headers/footers and you should have a replica without the problem.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

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

    Re: Non-existent macro (Word 2000)

    As I recall, stuff such as modifications to key bindings can generate the message, but I'm knot shure.

    I usually just move my active template files into Wurd's Templates directory and set security to Medium.

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Non-existent macro (Word 2000)

    Well, everyone, I've checked the VBA editor and "There's naught there, my lord." Nothing except for this interesting "reference" to another virtually identical document. What's up with this "reference"? I clicked on that reference, but it showed nothing interesting there, either.

    I also found (in the project explorer) something it calls "Template Project (A20MSWOO)." I tried to look at this mysterious project, but I get nothing but an error message, "Project Locked/Project is unviewable." I saw no modules whatsoever. So what's the deal with this "unviewable" project? Can I delete it? Should I?

    Meantime, I'll peruse that Woody's archive. Thanks, guys!

  7. #7
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Non-existent macro (Word 2000)

    I've now read that Woody's archive. Basically, the article suggests my document may have gotten an infection, which some "rudimentary" virus fixer disposed of but missed the part that displays the "macros" warning. Well, this is all happening on a networked computer at an industrial site that employs the latest and greatest Norton AV stuff--I have my doubts about a virus infection, but I know we're all vulnerable.

    Anyway, I'll try Andrew's suggestion, i.e., copy the document into a new file, styles and all. Andrew, you were very specific about copying styles. This document is rather complicated--it's almost nothing but a table that stretches over seven pages. <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> Can I just use CTRL+A and CTRL+C and paste the thing into an empty document? (Or will that approach take the ghost macro with it?) How 'bout inserting the old file into an empty document?

  8. #8
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-existent macro (Word 2000)

    Inserting the file into a new document should work. I have used this as a technique for getting rid of macros successfully.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  9. #9
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Eugene, Oregon, USA
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Non-existent macro (Word 2000)

    One more possibility--if you had a control from the Control Toolbox Toolbar (essentially adding a VBA-like control) in the text of the MS Word document, it will think that there are macros in the document even if the control doesn't have any programming attached to it.

Posting Permissions

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