Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Programmatically insert images from xml into Word 2003

Posted on 2008-11-10
7
Medium Priority
?
733 Views
Last Modified: 2013-11-08
I am pretty new to vb.net so please bare with my newness...
What I need to do is read xml files that are provided to me.  For each base64 image I find, I will decode and insert them programmatically into a Word document.  I have accomplished this in my older vb6  application but we are now updating all our applications to .net and am having some issues.  
So now, in .net, I decode [Convert.FromBase64String(xmlStr)] my base64 image into a byte array and.....what?? From here how do I add the image to my bookmark in my document?  In vb6 I was saving the decoded image to a file and then inserting the image - will I need to do this still?? or is there a way to do this without saving anything out to a file.  I have been looking and looking but have not been able to find any examples (I could be wording my inquiries wrong??) that will insert a decoded image without saving it to file first.  
Please let me know if you need any further information or if I need to clarify anything.  And many thanks in advance for any info!!
0
Comment
Question by:chilekitty
  • 4
  • 3
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22930805
Ah, yes, so many doors to check, so little time!! *WINK*

Here is a previous question that shows a class that I have in my bag-o-tricks:

http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22738049.html
0
 

Author Comment

by:chilekitty
ID: 22931046
Thanks for your quick response!!!  I was fortunate to have run into your class and have tried it and it works great.  But sorry to say, I am still stuck on the issue of what do I need to do now that I have this image.......I mean how do I now insert it into my Word document based on a bookmark?  
There are only so many ways to insert an image into word and I have not been able to find an example that does not require a filename or a copy to the clipboard both of which were a thumbs down per boss.  I feel like I'm missing something here....??  
So really the bottom line issue is how can I insert an image into Word (per bookmark) once I have the image in memory?  Any help would be greatly appreciated!

0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22931111
That, my friend, is a great question.  I haven't found a way, yet, to insert an Image into Word without an intermediate file, but that doesn't mean that is impossible.  
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 

Author Comment

by:chilekitty
ID: 22931192
I like the way you worded it....."yet".  I have hope.  Once again...much thanks for your help!

Hopefully someone may come across this question and have some insight into this dilemma.  
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22931233
If I have learned anything over these past 20+ years, is that nothing is impossible, just undiscovered.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 22931251
Would something commercial, like Aspose.Words, be an option?  I am not sure of its capabilities for your particular problem, but they have a free trial that you can download and test.

Aspose.Words for .NET and Java
http://www.aspose.com/categories/file-format-components/aspose.words-for-.net-and-java/default.aspx
0
 

Accepted Solution

by:
chilekitty earned 0 total points
ID: 23073050
Thank you TheLearnedOne....we are keeping it on the back burner for now.  There still may be hope for my issue.  Thanks again!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…
Suggested Courses
Course of the Month15 days, 9 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question