Formatting via a macro

R

Risky Dave

Hi,

I have an A3 page that has a single 3 x 3 table as its contents.

5 of the 9 table cells contain Excel charts imported as pictures using a
macro built into the source XL workbook. This bit works :)

What I now want to do is record a macro (within Word) that captures the
final formatting of each of these pictures (so that I can embed this code
into the XL workbook).

The problem I have is that as soon as I start to record the macro I can't
grab any of the objects :-(

I get the pointer with the little cassette icon indicating recording is
taking place, but can't actually do anything.

If I don't try to record my actions as a macro, there is no problem with
doing the formatting on the objects.

Any suggestions on how to resolve this would be gratefully recveived.

TIA

Dave
 
T

Tony Strazzeri

Hi,

I have an A3 page that has a single 3 x 3 table as its contents.

5 of the 9 table cells contain Excel charts imported as pictures using a
macro built into the source XL workbook. This bit works :)

What I now want to do is record a macro (within Word) that captures the
final formatting of each of these pictures (so that I can embed this code
into the XL workbook).

The problem I have is that as soon as I start to record the macro I can't
grab any of the objects :-(  

I get the pointer with the little cassette icon indicating recording is
taking place, but can't actually do anything.

If I don't try to record my actions as a macro, there is no problem with
doing the formatting on the objects.

Any suggestions on how to resolve this would be gratefully recveived.

TIA

Dave

That is a limitation of the macro recorder. Without explaining how to
address the objects by writing VBA code using the object model it will
be fiddly to do and may not be able to be completed.

However you can get a lot of the way by breaking up your process into
separate tasks and record them separately.

Stop the first macro immediately before the step where you need to
select the object.

Then select the object and record another macro from there on doing
what you need to do with the object possibley including the Unselect
(Click elsewhere, where the next part needs to start from) when
finished.

Then repeat the process for additional parts.

You will then need to compbine the different macros and edit the
recorded VBA code. In between you can add the VBA code that selects
the intended object. I can't be specific about that because of course
it will depend on what the object is and/or where it is but you
should be able to get some help by searching these groups for "select
object" or similar wording.


Hop this helps. If you get stuck you can always post the code you end
up with and a detailed description about the object and I'm sure
someone here will be able to help refine the code.

Cheers
TonyS.
 

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