Word 2002 & JPGs vs Word 97 - Macro Problem Formatting Images

J

JB

We have just changed to Office XP Pro from Office 97 Pro.

We have many documents with one JPG image per page, and
had developed macros on our toolbars to format the newly
inserted image (size, placement, wrapping, etc.)

We are having trouble re-doing these macros in Word 2002
(XP) - they just won't work.

When initially we insert the image from file, it comes in
with small black grips and we cannot resize it (is that
a "frame"?). If we select that image and then try to run
our macro, we get error "4198".

But after we select the image and change the formatting in
Layout and Position so that text wraps through (we have no
text, as such) and the image does not move with any text,
then the image then has the grips with white fill that we
are used to seeing.

Then we can select the image again and run our macro,
although the size won't change for us, nor wlll the
position relative to the margin (Horiz) or page (vert) --
I don't see anwhere to control that in the "format
Picture" dialog (the placement itself, not whether its
relative).

This is driving me nuts, and we have to do this a lot --
we use Word to organize and print large collections of
images.

Help!
 
W

Word Heretic

G'day "JB" <[email protected]>,

Sorry this isn't of more help to you, but unfortunately I have found
that Word XP is utterly abysmal with graphics. My Word Spellbook
recommends using linked, inline graphics to avoid as many problems as
possible. Whilst this still holds true in XP, for the first time I
having to deal with regular problems with even this method :-(

I am almost certain that if you wanted to truly resolve this you would
have to do any or all of these:

* Post the bad code

* Pay someone to investigate this for you

* Describe 4198 in more detail



JB said:
We have just changed to Office XP Pro from Office 97 Pro.

We have many documents with one JPG image per page, and
had developed macros on our toolbars to format the newly
inserted image (size, placement, wrapping, etc.)

We are having trouble re-doing these macros in Word 2002
(XP) - they just won't work.

When initially we insert the image from file, it comes in
with small black grips and we cannot resize it (is that
a "frame"?). If we select that image and then try to run
our macro, we get error "4198".

But after we select the image and change the formatting in
Layout and Position so that text wraps through (we have no
text, as such) and the image does not move with any text,
then the image then has the grips with white fill that we
are used to seeing.

Then we can select the image again and run our macro,
although the size won't change for us, nor wlll the
position relative to the margin (Horiz) or page (vert) --
I don't see anwhere to control that in the "format
Picture" dialog (the placement itself, not whether its
relative).

This is driving me nuts, and we have to do this a lot --
we use Word to organize and print large collections of
images.

Help!

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 
W

Word Heretic

G'day "JB" <[email protected]>,

ah ha! Right, what I did in these situations was to hijack the dialog
for my own use. I show it (not display it) and grab the filename and
do my own .insert routine exactly the way I want to. connect this
macro to a toolbar button and you're in business - a way of inserting
a picture your way - not Word's way.





JB said:
OK - Here's what works so far. I found that I can set the
default for inserted pictures to be "Through".

Tools/Options/Edit Insert/Paste Pictures: Through.

But I cannot record a macro that saves the positioning of
the image. I HAVE TO ADD THOSE LINES MANUALLY FROM AN
EARLIER WORD 97 MACRO!!!! Here are the lines I need:

Selection.ShapeRange.Height = 660.95
Selection.ShapeRange.Width = 506.9

What a hassle if I have to keep inserting these separately!

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
Email: (e-mail address removed)
Products: http://www.geocities.com/word_heretic/products.html
Spellbooks: 728 pages of dump left and dropping...

The VBA Beginner's Spellbook: For all VBA users.
 
J

JB

What I'm saying is that in Word 97, if I recorded a macro
for Format Picture, it always included the Height and
Width information. Word 2002 LEAVES IT OUT, even though
it's there in the dialog box. I have to add it MYSELF to
the macro code.
 

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