Macro secruity warning for a document with no macros

G

Guest

Using Word 2003, when I or others cut and paste content from a web-based
application into a fresh Word document, it creates a document that Word
believes contains macros. Every time the document is opened I get the macro
security warning pointing to the document itself. If I delete all the
content it no longer believes there are macros in the document. I have
looked for any macros in the VB editor interface and do not see any. Is this
perhaps some scripting from the web content that causes the concerns? When I
save the file as an HTML file, rather than DOC, I can see the javascript.
 
S

Stefan Blom

Your assumption is correct: the code is from the pasted data. Instead of
just pasting, you can click Edit | Paste Special and choose to paste
as "Unformatted Text"; that way, the problem should not arise.

--
Stefan Blom
Microsoft Word MVP


in message
Using Word 2003, when I or others cut and paste content from a web-based
application into a fresh Word document, it creates a document that Word
believes contains macros. Every time the document is opened I get the macro
security warning pointing to the document itself. If I delete all the
content it no longer believes there are macros in the document. I have
looked for any macros in the VB editor interface and do not see any. Is this
perhaps some scripting from the web content that causes the concerns? When I
save the file as an HTML file, rather than DOC, I can see the
javascript.
 
G

Guest

Of course, there is always one more level of question lurking behind a simple
question and answer... I don't want to paste as unformatted because there is
a lot of text formatting present that is needed. Any other ideas on work
arounds? How does one even view this javascript when editing a Word
document? What about some way to strip it out once pasted?
 
B

Beth Melton

It sounds like there are some controls in the pasted content or perhaps some
code. First press Alt+F9 to toggle on the view of field codes and see if
there is anything you are missing. If that's not it are there any controls
in the pasted data?

Also, when you copy/paste macros are not automatically generated - all
that's being pasted is what you see in the document.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Co-author of Word 2007 Inside Out:
http://www.microsoft.com/MSPress/books/9801.aspx#AboutTheBook

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 
S

Stefan Blom

Well, you can certainly avoid copying controls such as text fields,
check boxes, etc., but code (JavaScript for example) is harder to deal
with. Of course, you can delete it after it has been pasted into the
document.

--
Stefan Blom
Microsoft Word MVP


in message
news:[email protected]...
 
G

Guest

The presence of Javascript is revealed when the "reveal codes" mode is turned
on via Ctrl-F9 by the appearance of a little yellow icon (yellow box with a
green letter "J" turned at 45 degrees to the left inside of it). One can
double-click that icon to open Microsoft Script editor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top