473,609 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Adding images to a word file

5 New Member
Hi everyone,
I want to add an array of images to word document automatically via c# code.
Also i do not want the word doc to be open at the time of dumping images into it
i used the InlineShapes.Ad dPicture method for inserting the image into the documents.
But the first argument taken by AddPicture is the file name(string type) for the image.
I have with me the Image Object which i want to use?
Can anybody help me ?
Sep 8 '08 #1
2 1344
Curtis Rutland
3,256 Recognized Expert Specialist
Write the image to a file in the TEMP directory maybe? If the method wants a string, you have to give it a string.
Sep 8 '08 #2
talk2pk
5 New Member
Dumping the images to a temp folder created an overhead of deleting them.
Is there any mechanism by which we can add images to a Word doc without opening it ?
Also is there any other method to add picture into a word file except using AddPicture() method?
Sep 9 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2437
by: mark | r | last post by:
ok, so i now know how to add, edit, delete and search for products (havent figured out categorisation out yet tho) - how do i upload an image and save the file name to the database as part of the admin? something dummies can follow that doesnt use a component (can i throw in a chunk of code and specify the table fieldname and directory the file needs to go into?) cheerz mark
2
3956
by: Guillaume Durand | last post by:
Hi, I transform XML data in an OutputStream which is open as a word document. All works fine excepted the images defined in the xsl file which are html links (src="images/image1.jpg"). So, when I save the word document in a particular place, the image can't be displayed cause the path is no good anymore. I would like to merge the images in the word document without any external html links. Any idea?
2
3174
by: gerard.buskermolen | last post by:
Hello world, I have an ASP.NET application that returns HTML to the browser that should be read by MS Word. To do this I set Response.ContentType = ContentType.Word and render the HTML. The browser (IE6.0) shows a dialog box which enables the user to Open the HTML in Word or save it to disk. So far so good.
0
1221
by: gerard.buskermolen | last post by:
Hello world, I have an ASP.NET application that returns HTML to the browser that should be read by MS Word. To do this I set Response.ContentType = ContentType.Word Response.AddHeader("Content-Disposition", "Report.doc") and render the HTML.
2
2258
by: Yaseen D M | last post by:
I have aspx page which contains some gif, jpg and png images. PNG image is generated dynamically. This file is basically a graph image. The problem i am facing in exporting these images to word, excel and pdf. Is there anyway to export these images in ASP.NET I need solution urgent. Regards,
1
5498
by: mohan21_kumar | last post by:
Hi, How to Save images in ms word file when it is downloaded from asp.net application. I have used the following code to convert the html page into ms word file. but i'm not able to save the images from html to doc file. Please suggest me how to save an image from a html to doc file. I have used the following Code to convert HTML into doc file: Response.Clear(); Response.Buffer = true; Response.ContentType =...
11
2592
by: sandeepkedlaya | last post by:
Hello, I need to copy images from a folder and copy to a word document. I have done as follows.. but It copies only last image. Can any one of you help me in this.. Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Response.Buffer = True Dim DirPath As String DirPath = "D:\ASPDotNet\images\" Dim FileName As String
2
2999
by: Simon Wigzell | last post by:
I have inherited a database driven website that comes with a table of image links. The images are scattered all of the internet and there are thousands of them. I would like to write an asp script to just run through the table and download every link by it's URL. I thought I had id by faking a form with the "File" element and loading it with all the URLs. Would have worked except you cannot preload the "File" element. As I understand it,...
0
1255
by: talk2pk | last post by:
When i am writing the images to the word file(using Clipboard.SetImage) and open another word doc, the process of writing those images migrates to the new opened document. Can anybody suggest why this is happening? The requirement is to write the images in the file which i have specified.The opening of another word doc should not effect the process. Here is the code: document.Application.Selection.TypeText("\n"); ...
0
8109
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8035
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8188
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6034
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5502
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4002
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
1630
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.