Where can I find code for Word Macros like EditCopy and EditPaste

C

Chris

I'm trying to find existing code for the macros that already exist for
Microsoft Word; particularly the copy, cut, and paste functions. Does anyone
know where I can find this code for visual basic or where i can download
these functions? thanks.
 
J

Jonathan West

Hi Chris,

Strictly speaking, the build-in commands are not macros. But if you wish to
see the VBA code generated by those commands, simply record a macro while
carrying them out.
 
C

Chris

Hello Jonathan. Thanks for that advice. I tried doing that. I recorded a
macro of "copy" and then saved the macro. When I went back to view the code
in VB, the only code in the function was 'Selection.Copy'

Is there a way to see the code behind Selection.Copy?

thanks Jon.

Chris
 
J

Jay Freedman

Hi Chris,

As far as VBA is concerned, 'Selection.Copy' *is* the code of the Copy
command. (Formally, it's known as a 'primitive', a command that has no
components to look at.)

From the point of view of the Word program, the innards of the
Selection.Copy command are native machine code (for i86 or Mac)
compiled from C++ source code. The content of that source code is
proprietary to Microsoft.

What are you trying to do that leads you to want this information?

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 

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