flag a macro

J

Jezebel

The code goes in the red stripes. The outputs go in the white ones. The
arguments go in the stars. Then you soak it in petrol, wrap it around your
head, and strike a match.
 
B

breeze

Why do not show this as some example?


Jezebel said:
The code goes in the red stripes. The outputs go in the white ones. The
arguments go in the stars. Then you soak it in petrol, wrap it around your
head, and strike a match.
 
J

Jay Freedman

We're having a language problem here -- I don't understand what you mean by
the word "flag". There is no operation called "flag" that I know of.

If I understand the second part of your sentence correctly, don't even try
it. You should not open a Word document file in any program except Word, or
you risk corrupting the file so that it can't be used again. There is a
macro editor built into Word and other Office programs, and that's what you
should use.
 
C

Chad DeMeyer

Perhaps you could provide a more comprehensive description of what you are
trying to do? I'm afraid none of your respondents to date, including
myself, have the faintest idea what "How to flag a macros" means.

Regards,
Chad
 
J

Jezebel

There's a virus technique that involves recognizing the macro not as binary
within the document file but within *memory* when the document is open. The
macro initially contains what look like gibberish comments but is actually
encrypted code. A separate part of the virus identifies the macro in memory,
decrypts the gibberish, then executes it.

But if you know enough to be doing that sort of coding (which I don't), you
wouldn't be seeking help from this forum. I hope.
 
B

breeze

Problem consists that the macro is extremely complicated, constantly show
various errors, etc, so I just mean try to debug it, and flag macro for more
convenience. MS default tools are very complicated and inconvenient.
Possibly some independent debugging tool could help.

Regards,
breeze
 
B

breeze

I exacty mean this vaste and complicated MS tools. May be there is some
ms-independent, more convenient debugging tool that can do this job more
handy?

Regards,
breeze
 
C

Chad DeMeyer

breeze,

Not that I know of. The debugging tools in the VBE are actually quite
superior. In many other debugging environments, for instance, one would not
have the ability to step through code one line at a time, as in the VBE.
But it does require an investment of time and a willingness to learn before
it becomes useful.

Regards,
Chad
 
J

Jezebel

You should put your time into designing your macro better, rather than
adding the complication of additional software to work out what's gone wrong
with what you've done so far.

But I still have no idea what 'flag the macro' means.
 
B

breeze

I agreed. I just need mark('flag the macro' means mark the macro) the
beginning and the end of my macro in Word document, that then I could see
where my macro start and where end when I browse/debug this document in
debug tool.
 
C

Chad DeMeyer

Anytime you see "Sub" or "Function", followed by a single word (name of the
macro), followed by parentheses, which may or may not have text within them,
that is the start of a subprocedure macro or a function macro. Everytime
you see "End Sub" or "End Function", that is the end of a macro.

Regards,
Chad
 
H

Helmut Weber

Hi Chad,
let us see, how far you get on the open ended frustration scale.
;-)
A quote:
XII. Catastrophic:
Total destruction; objects are thrown into the air,
much heaving, shaking and distortion of the ground.
Where as XI is already pretty bad:
XI.Very Disastrous:
Few buildings remain standing; bridges and railways destroyed;
water, gas, electricity and telephones out of action.
 
C

Chad DeMeyer

LOL...
but actually, this thread has become rather more entertaining than
frustrating ...
.... and XII is reserved for my feelings about the current president and
administration here in the U.S.

Regards,
Chad
 
B

breeze

Yes, editing macros in Word documents is not easy since the doc file format
is pretty complicated. Nevetheless, I think, I find the solution:
we can use the following technique on a doc file. We can to save one copy
of document with the macro, and one copy without the macro. Then load up
both files in Hex Editor and run a binary compare 'Compare Files'. By
looking at the differences between the files, we should be able to see where
the macro is. There should be a number of differences in the file, but we
can easily see where the macro started and ended near the end of the file.

Regards,
breeze
 

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