Hi

I created a document with some vba code in it for testing. Now that I
checked it works, I have put the code in normal.dot and removed the module
from this document. However, whenever I open it, I still get the macro virus
warning asking me whether I want to enable or disable macros. I don't get
this with other documents, so how do I stop it happening with this one
please?

(Word 97)

Thanks

GB

Re: Enable/disable macros when none in document by Jay

Jay
Mon Mar 19 20:39:59 CDT 2007

Save the document as an RTF file. Then load the RTF file into Word and
save it as a .doc file. Because the RTF file format doesn't support
macros, the converter discards the bits that make Word think there's a
macro in the file.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Tue, 20 Mar 2007 00:26:18 -0000, "GB" <NOTsomeone@microsoft.com>
wrote:

>Hi
>
>I created a document with some vba code in it for testing. Now that I
>checked it works, I have put the code in normal.dot and removed the module
>from this document. However, whenever I open it, I still get the macro virus
>warning asking me whether I want to enable or disable macros. I don't get
>this with other documents, so how do I stop it happening with this one
>please?
>
>(Word 97)
>
>Thanks
>
>GB
>

Re: Enable/disable macros when none in document by GB

GB
Tue Mar 20 08:39:15 CDT 2007


"Jay Freedman" <jay.freedman@verizon.net> wrote in message
news:ioeuv2pf0damsnlsd01luoodaq5ao2vk39@4ax.com...
> Save the document as an RTF file. Then load the RTF file into Word and
> save it as a .doc file. Because the RTF file format doesn't support
> macros, the converter discards the bits that make Word think there's a
> macro in the file.
>

Thanks, Jay. I'll do that.

Before posting, I looked at the doc properties in the VBA editor, but I
couldn't work out which ones to change. They must be somewhere in the object
model, as I assume Word uses the object model to decide whether to bring
that dialogue up in the first place.

BTW, on a point of Netiquette, is it the norm to top-post on these Microsoft
forums? If so, I shall change my style. When in Rome, do as the Romans, as
my Daddy used to say.








> --
> Regards,
> Jay Freedman
> Microsoft Word MVP FAQ: http://word.mvps.org
> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.
>
> On Tue, 20 Mar 2007 00:26:18 -0000, "GB" <NOTsomeone@microsoft.com>
> wrote:
>
>>Hi
>>
>>I created a document with some vba code in it for testing. Now that I
>>checked it works, I have put the code in normal.dot and removed the module
>>from this document. However, whenever I open it, I still get the macro
>>virus
>>warning asking me whether I want to enable or disable macros. I don't get
>>this with other documents, so how do I stop it happening with this one
>>please?
>>
>>(Word 97)
>>
>>Thanks
>>
>>GB
>>



Re: Enable/disable macros when none in document by Jay

Jay
Tue Mar 20 12:50:04 CDT 2007

GB wrote:
> "Jay Freedman" <jay.freedman@verizon.net> wrote in message
> news:ioeuv2pf0damsnlsd01luoodaq5ao2vk39@4ax.com...
>> Save the document as an RTF file. Then load the RTF file into Word
>> and save it as a .doc file. Because the RTF file format doesn't
>> support macros, the converter discards the bits that make Word think
>> there's a macro in the file.
>>
>
> Thanks, Jay. I'll do that.
>
> Before posting, I looked at the doc properties in the VBA editor, but
> I couldn't work out which ones to change. They must be somewhere in
> the object model, as I assume Word uses the object model to decide
> whether to bring that dialogue up in the first place.
>
> BTW, on a point of Netiquette, is it the norm to top-post on these
> Microsoft forums? If so, I shall change my style. When in Rome, do as
> the Romans, as my Daddy used to say.

Word displays the macro warning when it sees that the document contains
certain internal binary structures that support macros. Those structures
aren't visible in the object model, the VBA editor, or anywhere else except
a hex editor (if you know what you're looking for). It's pure serendipity
that the doc-to-RTF-to-doc dance cleans out the structures completely
without destroying the document's formatting.

As to top-posting vs. bottom-posting, there's no agreement around here. I'll
do either, especially when a thread already has a few posts and the
direction is established. Personally I prefer top-posting, especially when
I've already read the preceding posts, because I'm lazy and don't like to
scroll a lot. :-) I don't mind reading bottom-up when I have to. Other
people feel strongly about bottom-posting. That's fine, but I don't like it
when a self-appointed net nanny lectures folks about it.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.



Re: Enable/disable macros when none in document by GB

GB
Tue Mar 20 17:25:05 CDT 2007


"Jay Freedman" <jay.freedman@verizon.net> wrote in message
news:%23$VpxgxaHHA.2316@TK2MSFTNGP04.phx.gbl...

>
> Word displays the macro warning when it sees that the document contains
> certain internal binary structures that support macros. Those structures
> aren't visible in the object model, the VBA editor, or anywhere else
> except a hex editor (if you know what you're looking for). It's pure
> serendipity that the doc-to-RTF-to-doc dance cleans out the structures
> completely without destroying the document's formatting.

Thanks, that worked. (I expect it comes as no surprise.)

>
> As to top-posting vs. bottom-posting, there's no agreement around here.
> I'll do either, especially when a thread already has a few posts and the
> direction is established. Personally I prefer top-posting, especially when
> I've already read the preceding posts, because I'm lazy and don't like to
> scroll a lot. :-) I don't mind reading bottom-up when I have to. Other
> people feel strongly about bottom-posting. That's fine, but I don't like
> it when a self-appointed net nanny lectures folks about it.

I prefer top-posting, but I've got into the habit of bottom-posting as I've
been lectured too many times.

Thanks for your help, once again.