Embed a vba macro

Embed a vba macro

Anonymous
Not applicable
605 Views
8 Replies
Message 1 of 9

Embed a vba macro

Anonymous
Not applicable
Can some show me how to embed a vba a macro into a drawing using lisp or vba once its loaded?

Thanks
0 Likes
606 Views
8 Replies
Replies (8)
Message 2 of 9

Anonymous
Not applicable
wrote in message news:5865117@discussion.autodesk.com...
Can some show me how to embed a vba a macro into a drawing using lisp or vba
once its loaded?

Thanks

vbaman
select project
embed

hth
mark
0 Likes
Message 3 of 9

Anonymous
Not applicable
Thanks, but Im looking for a way to do it with code, that would be a lot of work in 20000 dwgs. Lisp /VBA/.net is fine.

Thanks
Kent
0 Likes
Message 4 of 9

Anonymous
Not applicable
whoa, make sure you want to do that first. if one drawing's code were to
change then the other 19999 would be different. as you can see, that would
lead to a nightmare.

i don't know that there is a way to do it using VBA.

wrote in message news:5865412@discussion.autodesk.com...
Thanks, but Im looking for a way to do it with code, that would be a lot of
work in 20000 dwgs. Lisp /VBA/.net is fine.

Thanks
Kent
0 Likes
Message 5 of 9

Anonymous
Not applicable
Yep I would love to, Im going to point it to a single network file (if it finds it) to load everytime a drawing is loaded. You can always remove the code across all files, Ive found that code.

Thanks
0 Likes
Message 6 of 9

Anonymous
Not applicable
I'm certain that you can't "Enable" a macro through VBA code in any VBA
enabled application. If you could, it would allow malicious code to spread
like wildfire. I would be surprised if there is a way to embed a macro via
code for similar reasons.

Gary
0 Likes
Message 7 of 9

Anonymous
Not applicable
So If I had the time I could open all my dwgs (20000) and embed the macro into each file that does something malicious to anyone that opens them, so I'm certain you can
"Enable" a macro through VBA. The question is can I do the EMBEDING of my macro with code? Allowing me to embed something beneficial systematically is not the issue, just a time saver.

Thanks
0 Likes
Message 8 of 9

Anonymous
Not applicable
In Acad 2004 you can turn on "Auto Embed" in "Macro Options". Maybe you
could use that. Don't know if it still exists in higher versions.

In that same dialog box there is a switch titled "Enable macro virus
protection". That switch can not be toggled by VBA in any VBA enabled app.
If it is on the user is asked to allow or disallow the macro to run. If you
could control that switch with VBA code, so could a criminal looking to
format your hard drive.
0 Likes
Message 9 of 9

Anonymous
Not applicable
Hi,

What can embedded code do that "load on startup code" can't?

Aspects I can think off are:

Increase the drawing size
Create FUD for all users who haven't been briefed as to the nature of the
code.
Make enhancing the code far more difficult than need be if it is maintained
as an external file

--


Regards

Laurie Comerford

wrote in message news:5866003@discussion.autodesk.com...
So If I had the time I could open all my dwgs (20000) and embed the macro
into each file that does something malicious to anyone that opens them, so
I'm certain you can
"Enable" a macro through VBA. The question is can I do the EMBEDING of my
macro with code? Allowing me to embed something beneficial systematically is
not the issue, just a time saver.

Thanks
0 Likes