Discussion:
How to add a custom hidden object into MS Word Document
(too old to reply)
Ahmad Jalil Qarshi
2005-02-18 10:49:03 UTC
Permalink
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
2005-02-18 16:33:46 UTC
Permalink
Post by Ahmad Jalil Qarshi
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.
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.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
***@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Loading...