473,394 Members | 1,845 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

insert images in word with c#

4
hi, i'm inserting some images in a word document, and i want to separate this images with a carriage return, but when i insert new lines they are inserted at the end of document. i want to insert: image, new line, image, new line, ...

here's the code:
Expand|Select|Wrap|Line Numbers
  1. ...
  2. for(int i=0; i<12; i++)
  3. {
  4.    Word.InlineShape shape = wDoc.InlineShapes.AddPicture(@"D:\image" + i.ToString() + ".jpg", ref missing, ref missing, ref missing);
  5.    shape.AlternativeText = "image: " + i.ToString();
  6.  
  7.    Word.Range range = wDoc.Bookmarks.get_Item(ref oEndOfDoc).Range;
  8.    range.Text = Environment.NewLine;
  9. }
  10.  
Apr 11 '07 #1
0 1818

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

Similar topics

2
by: Pamel | last post by:
I currently have a page that has 6 images in a row. Using javascript, when the mouse goes over one of the images, a word is placed below the images. Each image has a different word. I am trying...
2
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...
0
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...
1
by: JSL | last post by:
How to insert images into a Microsoft Word document using VB.NET?? my code: Public Function PictureReport() (it doesn't work!!!) On Error Resume Next Dim oDoc As Word.Document Dim range As...
11
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...
0
by: avisekrishi | last post by:
Hi , I have 100 image . I need to follow the following steps 1. Open a word document 2. Click on Insert -> Picture -> File and then open the image file 3. The Image gets opened in Word.
4
bugboy
by: bugboy | last post by:
I'm inserting a new word into table 'w' and a definition into table 'c' which are linked in table 's' which is the relation table for the many to many relationship between 'w' and 'c'. I've been...
3
by: tesa | last post by:
Thanks for the help early this morning! The one problem I can not figure out still is how to swap the images. I have the images in an array. is the image to start with.... then as the player...
1
by: Pedro Rosas Silva | last post by:
Hi everyone, Is anybody aware of a way how to insert an image in a WordML document programmatically, through C#? I have a C# application that loads into memory a WordML document...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.