hi!
i am working in VC7. I want to add a custom object (Image+Data) into the MS
Word Document. The Data will be something related to the image i.e name of
the image, format details etc and will be linked to the image shown on the
word document. Further more the data will be hidden. i.e. not visible to the
viewer of the document.
i have added the image into the Word document using the following code.
VARIANT var1; VariantInit(&var1);
VARIANT var2; VariantInit(&var2);
var1.vt = VT_BOOL; var1.boolVal = true; //SaveWithDocument
var2.vt = VT_BOOL; var2.boolVal = false; //LinkToFile
spSelect->InlineShapes->AddPicture("C:\\Documents and
Settings\\ahmadjalil\\My Documents\\My Pictures\\Sample.jpg",&var2,&var1);
VariantClear(&var1); VariantClear(&var2);
where spSelect is smart pointer of type Selection Object.
if some one knows about that. Please help me.
Thanks in advance.
Ahmad Jalil Qarshi
Jean-Guy Marcil - 18 Feb 2005 16:32 GMT
Ahmad Jalil Qarshi was telling us:
Ahmad Jalil Qarshi nous racontait que :
> hi!
>
[quoted text clipped - 3 lines]
> image shown on the word document. Further more the data will be
> hidden. i.e. not visible to the viewer of the document.
From the look of your code, that is not a beginner query!
I do not think that you can associate metadata with a picture in Word,
unless, maybe, that you use an XML document.
Here are 3 ideas anyways:
1) Add the text next to the picture and format it as Hidden (Font dialog).
It will only be visible if the user clicks on Show All (?) and is not
printed by default.
2) For very picture you insert, create a text custom property to store the
info.
3) For every picture you insert create a document variable to store the
information.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Jean-Guy Marcil - 18 Feb 2005 16:34 GMT
Ahmad Jalil Qarshi was telling us:
Ahmad Jalil Qarshi nous racontait que :
> hi!
>
[quoted text clipped - 3 lines]
> image shown on the word document. Further more the data will be
> hidden. i.e. not visible to the viewer of the document.
Please do not multipost.
If you want you can crosspost (Many newsgroups in the To: field when you
create your message.)
The reason is simple:
People may end up "wasting" their time answering a post that has already
been answered elsewhere, thus it may be very likely that their particular
response to a post be totally ignored if the reply received elsewhere was
satisfactory to the original poster.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org