Shift+F9 does not work in 2007

S

Sevilho

Graphic file is linked. But
1) it can be seen only in page layout (in Word 2003 I can see it in Normal
mode)
2) Shift+F9 does not work to see link.

Is it right? Is any method to see the picture in Normal mode ?
 
S

Stefan Blom

1. Draft view is not WYSIWYG. Switch to Print Layout view (or to Print
Preview) in order to see a correct view of your document.

2. Change the Text Wrapping to "In line with text"; then you can see the
field code if you select the graphic and press Shift+F9.
 
M

macropod

Hi Stefan,

Unless Word 2007 is operating in Word97-2003 compatibility mode, it will steadfastly refuse to disclose an INCLUDEPICTURE field,
regardless of the view or graphics layout.
 
S

Stefan Blom

Hi,

I keep forgetting that Word 2007 deals with graphics differently... :-(

Thank you for clarifying this.

--
Stefan Blom
Microsoft Word MVP



macropod said:
Hi Stefan,

Unless Word 2007 is operating in Word97-2003 compatibility mode, it will
steadfastly refuse to disclose an INCLUDEPICTURE field, regardless of the
view or graphics layout.

--
Cheers
macropod
[Microsoft MVP - Word]
 
P

Peter Jamieson

2) Shift+F9 does not work to see link.

Unless your .docx/.docm is in compatibility mode, or you inserted your
picture in a very specific way (see below at ***), I do not believe that
Word 2007 .docx/.docm files retain INCLUDEPICTURE fields at all, even
when you originally inserted the picture using
a. an INCLUDEPICTURE field or
b. using insert->picture->insert and link to file (which creates an
INCLUDEPICTURE field in Word 2003, but not in a .docx in Word 2007)

IN cases where you have a linked picture, but where Word has lost the
INCLUDEPICTURE field, Word actually represents the link in a completely
different way, using:
a. a "relationship" that specifies the pathname of the image file.
b. a copy of the image, renamed, inside a "media" folder within the
..docx - e.g. it may be named image1.jpeg
c. a relationship that specifies that image's pathname within the .docx.

The problem is that as far as I can tell, even though the link
information is present in the .docx/.docm file,
d. these links are not regarded as the kind of links that appear in
the "Edit Links" dialog
e. you can't access this information using Word VBA and the "Word
Object Model"
f. it is not obvious how you would access the information while the
document was open.

That said, if you need to know the original path, but you simply cannot
get Word to display an INCLUDEPICTURE field, you /may/ be able to get
the information as follows:
a. save the document using Word 2007 .xml format (Office button->Save
As->Other formats, then select "Save As Type" Word XML Document.
b. open the .xml file using Notepad, or using Word if you know how to
open it as a plain text file,
c. use "find" to look for "w:drawing" . You should find something like
<w:drawing><wp:inline distT="0" distB="0" distL="0"
distR="0"><wp:extent cx="5724525" cy="4295775"/><wp:effectExtent
l="19050" t="0" r="9525" b="0"/><wp:docPr id="1" name="Picture 1"
descr="C:\Users\Public\Pictures\Sample Pictures\Creek.jpg"/>

You can see that the picture pathname is recorded in there. However,
that is as far as I can lead you: if there are multiple pictures/graphic
objects, I cannot currently tell you an easy way to determine which
picture is linked to which file. It should be possible to write some VBA
or XSLT to get more useful information out of the .xml file, but I
haven't tried that yet.

For anyone else reading this who would like to take it a little further,
it may be worth knowing that the "wp" prefix used in the .xml file is
not declared anywhere in the .xml - in other words, it's not valid XML.
However, that might not prevent code that relies on an XML parser
(either VBA or XSLT) from succeeding.

Maybe I'll get around to doing more myself at some point.

***As far as I know, the only approach that will actually insert an
INCLUDEPICTURE field into a .docx/.docm that is not a compatibility mode
file is to insert the field code manually, e.g. insert { } using
ctrl-F9, then type the field code text inside, e.g. so you have
{ INCLUDEPICTURE "c::\\mypictures\\mypicture.jpg" }

Then select and update the field. /That/ field code should survive
Save/Close/Open as a .docx file, even when you do not select
compatibility mode.


Peter Jamieson

http://tips.pjmsn.me.uk
 
P

Peter Jamieson

Thanks Jay. You are right.

Funny, I was definitely encountering picture objects with no such info.
Probably experimental error on my part, but I'll try to go through the
tests again at some point when I'm not so bog-eyed.

However, I am still reasonably sure that the actual INCLUDEPICTURE
fields themselves are being removed and replaced by the other link
information I described, and I am reasonably sure that Word never
regenerates INCLUDEPICTURE fields from that newer-style link information.

Peter Jamieson

http://tips.pjmsn.me.uk
 
J

Jay Freedman

Yes, that's correct -- the information is in the object's LinkFormat
property, but there is no INCLUDEPICTURE field. Any code from previous
Word versions that depends on reading or modifying the INCLUDEPICTURE
field code (for example, replacing the path in the file name) will
fail.

The interesting part is that if you use File > SaveAs to save the
document in Word 2003 format, it "magically" reconstitutes the
INCLUDEPICTURE field.

The part I really don't understand is why the dev team felt they had
to mess with this. "Who knows what evil lurks..."

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

Peter Jamieson

Yes, the regeneration of INCLUDEPICTURE fields is interesting. At first
I thought it only happened when the INCLUDEPICTURE field itself (rather
than the link info.) was retained. (I think I must have broken some
links inadvertently when I was looking at this, and that pictures that I
thought should be linked no longer were. Oh well.)
The part I really don't understand is why the dev team felt they had
to mess with this. "Who knows what evil lurks..."

As usual it's easy to think of a number of reasons, but which ones
actually drove the whole thing is anyone's guess.

Peter Jamieson

http://tips.pjmsn.me.uk
 
M

Miles

Microsoft support confirmed that this is a bug around mid-December '09. After
some confirmatory testing, they seemed rather shocked to discover that not
all support issues are user errors!
As usual it's easy to think of a number of reasons, but which ones
actually drove the whole thing is anyone's guess.
Nasty 'ol neglect, apparently. They did some research and determined that
their developers' test suite doesn't even include IncludePicture tests! This
makes sense since IncludePicture has been quietly deprecated in 2007 --
searching for IncludePicture in Word Help comes up rather empty these days.
Microsoft obviously want their badly-flawed IncludePicture feature to just
fade away.

At any rate, they've promised a fix in SP3 which they say is due sometime
around March, so I'd wait until then before investing a lot into finding a
workaround.
 

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