Need macro to insert icon relative to cursor

J

jloving

I am trying to modify a Word template (author unknown). The template
includes recorded macros that insert an icon into the document relative
to wherever the cursor is positioned on the page when you run the
macro. I am trying to record new macros to insert different icons, but
my icons are always inserted on the page wherever they appeared when I
recorded the macro. I want the macros to appear vertically in line
with the left margin of the page (which I've been able to achieve) and
horizontally in line with wherever my cursor is on the page when I run
the macro (which I have not been able to achieve).

I've tried looking up the VB code behind these macros to figure out how
they work, but when I bring up the list of macros associated with this
template, none of the macros that insert these icons appear on my
macros list, which is also a mystery to me.

Can someone help me?
Thanks!
Jessica
 
J

Jezebel

To look at the macro code, switch to VBA (Alt-F11) then use the project
explorer to display the contents of the code modules. Macros are listed in
the macro list only if they are Public Subs that take no arguments. It may
be that the macros you are currently using are making calls to other code
(which is why you can't see the code). Given your description, it is
unlikely that these are 'recorded' macros -- more likely they were properly
written.
 
J

jloving

Okay, my experience with VBA is extremely limited, but this doesn't
seem to be working either. I switched to VBA and looked through
everything under the Project Explorer area, but I'm still not seeing
the code for any of the macros the insert the icons. Any other ideas?

Thanks!
Jessica
 
J

Jezebel

If the macros run, they ARE there. Are there any unviewable projects or
add-ins?
 
J

jloving

How would I determine if there are any unviewable projects or add-ins?
(I apologize, but my experience iwth VBA is almost nil.) I opened my
template and click ALT-F11 to open VBA. Once there, I have a small
window on the left labeled "Project - Template Project" that lists
"Normal", "Project (Document 1)", and "TemplateProject (CIBER_00)".
(CIBER_00 is the name of my template.) Then there's a large window on
the right that shows code. I have expanded all the folders under the
headings in the Project - Template Project window but still don't see
the code for the macros I'm looking for.

Thanks!
Jessica
 

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