Inserting an image into an Image ContentControl

S

Scott M

Does anyone have some code where I can push an image object that I pull from
a webservice (as a byte array) into an Image ContentControl?

Thanks
Scott
 
W

Wei Lu [MSFT]

Hello Scott,

I would like to know which ContentControl you are using. Did you use it in
the Office add-in or your are use some .NET control?

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Scott M

I'm using the picture content control that is on the developer tab. I'm
automating word from VB 2005.
 
C

Cindy M.

Hi Scott,
Does anyone have some code where I can push an image object that I pull from
a webservice (as a byte array) into an Image ContentControl?
Assuming we're talking about a Word 2007 ContentControl, you can

1. Put the image on the Clipboard, then use the Paste method

2. Save the image stream as a file, to disk, then use the
InlineShapes.AddPicture method

3. Convert the byte array to the required (base64, I think) XML code format
required by the Ecma OpenXML file format (see OpenXMLDeveloper.org) and put
that into a Custom Part associated with the content control.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
W

Wei Lu [MSFT]

Hello Scott,

Did Cindy's suggestion resolve your issue?

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hi ,

How is everything going? Please feel free to let me know if you need any
assistance.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Scott M

I really didn't want to persist it to disk. I did find a solution online.
If I remember Monday I'll post the code that I ended up using so everyone
can see.
 

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