[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Standalone utility to remove *all* macros from Word document?

Posted on 2007-08-09
11
Medium Priority
?
1,528 Views
Last Modified: 2013-11-05
I used to have a standalone utility (Windows EXE file) which, when run, would remove all the macros from selected Word .doc files -- i.e. not just VB macros (or potential viruses) but also keyboard shortcuts and so on. After upgrading my system I can no longer find it and have forgotten the name -- searching Google doesn't help either. I believe it was freeware.

I need this tool because a .doc I am editing at present has started to crash Winword every time it opens, and this is evidently due to the macros included (e.g. when opened with macros disabled, there is no problem -- except that I cannot save the file; no macros are visible in Tools - Macros so it is likely to be a keyboard shortcut). Saving the document as RTF does not work; creating a new file and copy-pasting does not work; creating a new file and doing Insert - File does not work. I recall the utility described working perfectly in such scenarios in the past... If only I could find it again!
0
Comment
Question by:ozaru
  • 4
  • 4
9 Comments
 
LVL 21

Expert Comment

by:Eric Fletcher
ID: 19665531
I don't know about a utility, but you could do the same thing from the Organizer dialog (Tools | Templates and Add-Ins, then click the Organizer button). In the Toolbars and Macro Projects tabs, select all items from the document and Delete.

If that doesn't solve the problem, add a single extra paragraph to the document, then copy everything above it (i.e. not the last ¶ mark) and paste it into a new blank document. This can often eliminate issues associated with the section definition associated withe the document (it is in the last ¶) and won't bring any customization associated with the original document when it gets pasted.
0
 

Author Comment

by:ozaru
ID: 19665688
Thanks for trying Eric, but...
Organizer - Toolbars / Macro Projects are blank. That's another reason I suspect the only so-called "macros" in the document are keyboard definitions, which for some bizarre reason cannot be listed separately AFAIK, only viewed by scrolling one-by-one through Tools - Customize - Keyboard. (I wonder if someone's written a utility to output all keyboard definitions in Normal.dot and/or currently open document(s) to a readable file, sorted by key rather than category/command... I've often felt it would be useful).
Copy / Paste into a new document fails, saying "There are too many edits in this document. This operation will be incomplete." (and in fact nothing gets pasted in)
0
 
LVL 21

Expert Comment

by:Eric Fletcher
ID: 19666230
Uh oh... Sounds like you have revision marks on. Use the Revisions toolbar to accept all changes in the document -- you may have to do it >1 time, and also remove all comments (unless you need them). I'm using Word 2003 so am unsure of exactly how this worked in Word 2000 but have certainly encountered problems when there are many edits being tracked in a document.

I doubt if keyboard remapping would cause this; partly because that wouldn't have much effect unless they were remapped to a macro -- and you say there are no macros there.

Have you tried disconnecting the template and attaching a different one? If this only happens with one of many documents, the problem is in the document. If it happens with any new document, the problem is in your Normal.dot template. To fix it, just delete it (after maybe making a backup JIC...) and Word will create a new default Normal.dot template.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:ozaru
ID: 19666469
>Sounds like you have revision marks on

Nope, revision tracking is off, and there are no existing revisions in the doc.

>also remove all comments

There were a few short comments, and I tried deleting them -- no difference.

>I doubt if keyboard remapping would cause this; partly because that wouldn't have much effect unless they were remapped to a macro -- and you say there are no macros there.

I've frequently found documents warning me that they contain macros, where the only non-visible content is a custom keyboard shortcut to a style (for example), which doesn't show up anywhere else. That's why I thought this is the probable cause (and the "macro" warning is a misnomer). Having said that, I just tried creating a new doc with a style/shortcut etc. and it doesn't give me a macro warning, so maybe this isn't actually the case (or maybe macros created using my own ID are 'trusted' or something). Also, I have checked with the VB Editor for 'orphan' modules (with no content), which can apparently trigger spurious 'macro' warnings, but there are none.

>Have you tried disconnecting the template and attaching a different one?

Tried it, makes no difference. FWIW when the doc is opened (with macros allowed), saving fails with the error "the disk is full" (it is not, and I've tried other disks etc.). MS site offers various possible solutions to the incorrect 'disk full' message (defrag, clear \temp, rename normal.dot etc.) but none of those make any difference.

>If this only happens with one of many documents, the problem is in the document. If it happens with any new document, the problem is in your Normal.dot template

It only happens with this one doc. :-(
0
 

Author Comment

by:ozaru
ID: 19666640
P.S. not really relevant, but FWIW I just found a good keyboard shortcut lister at www.chriswoodman.co.uk/Shortcut%20Organizer.htm -- only drawback I can see is that it doesn't handle shortcuts saved in a .doc rather than a .dot (so it doesn't tell me if there are any in the particular awkward .doc I'm dealing with)
0
 
LVL 21

Expert Comment

by:Eric Fletcher
ID: 19667061
Okay, time for more drastic measures. Bring up the Find & Replace dialog, and put "^b" (without the quotes) inthe Find what box. This will find section breaks. In the Replace with box, you could leave it empty and lose the markers, or put something unique in so you can find where the removed sections were later if you need to. I use "}{^p" which puts a unique code on a paragraph of its own in place of the section marks. Click Replace All.

Now select everything except the last ¶ and copy to paste it into a new document.

You won't have teh section details this way, but it will get rid of some other known glitches in doing so. Let me know...
0
 

Author Comment

by:ozaru
ID: 19668286
Thanks for persisting, Eric, but still no joy: the ^b replacement finds nothing to replace (there are no section breaks).

However, I have now tried an approach I should have used earlier: attempting to isolate whether or not the problem is linked to a particular location. The simplest way to check this was to cut & paste bit by bit into a new document until an error occurred. When I did that, I discovered that the problem lay in a part of the text that had evidently been pasted in from a website. I limited it to a table cell containing a drop-down selection box (the field code showed { HTMLCONTROL Forms.HTML:Select.1 })

When this cell was deleted, all the problems described vanished. When I deleted it and tried to Undo, or copied and pasted it within the same document, Word crashed. When I deleted the column next to it so that the table tried to readjust widths etc., Word crashed. When I displayed the context menu for the drop-down box and selected Object, it said "the server application, source file, or item cannot be found".

I partially duplicated the behaviour with a blank document by pasting in drop-down list boxes from various websites including the one I believe this originated from (e.g. the doc still said macros were included although none were listed via Tools - Macros) but the specific problems I had did not appear and some of the behaviour was different. I also noticed that when activating Design mode and examining the Properties for the object, newly pasted boxes showed HTML Select etc., but the one causing the problems merely showed the Document object as a whole.

My conclusions? Somehow (before reaching me) the drop-down listbox object pasted in from a website had become separated from its actual object definition. The solution: delete it (and if need be re-paste from the original website). The alternative solution: find that utility I remember using in the past, which would have removed the offending 'macro' code. Maybe I'll have to trawl through last year's 100-odd CDR system backups...

So, Eric, although your input was helpful in that it made me think of different approaches, it didn't really provide the solution. Can I give you e.g. 75 points for your efforts?
0
 
LVL 21

Expert Comment

by:Eric Fletcher
ID: 19670197
No, that's okay; you found the solution. That is an odd one though, and a good example of the risks in copying things blindly!
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20343746
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
This video walks the viewer through the process of creating an MLA formatted document, as well as a bibliography with citations.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
Suggested Courses
Course of the Month19 days, 1 hour left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question