473,398 Members | 2,165 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,398 software developers and data experts.

Disappearing pictures in VB generated Word document

I used http://support.microsoft.com/kb/316383/en-us as the basis of
some code to generate a Word document using VB code (.NET2005).
In the code I have a loop which produces a table and in the merged
left hand column I place a picture (looping round a directory full
of ,jpg files - a table entry in the Word document for every picture).

All works fine and the document looks fine on the screen and in Print
Preview, but when I print only about 1 in 6 of the pictures appear on
the paper (always the same ones when reprinted). The other tables have
a blank left hand column.

This is the code which creates the table:
Dim oTable As Microsoft.Office.Interop.Word.Table
RPath = RDirectory & RFileName
oTable
=oDoc.Tables.Add(oDoc.Bookmarks.Item("\endofdoc"). Range, 4, 3)
oTable.Cell(1, 2).Range.Text = "File"
oTable.Cell(1, 3).Range.Text =
RPath.Substring(InStrRev(RPath, "\"))
oTable.Cell(2, 2).Range.Text = "Date"
oTable.Cell(3, 2).Range.Text = "Location"
oTable.Cell(4, 2).Range.Text = "Notes"
oTable.Columns.Item(1).Width =
oWord.InchesToPoints(2.5)
'Change width of columns 1 & 2
oTable.Columns.Item(2).Width =
oWord.InchesToPoints(0.75)
oTable.Columns.Item(3).Width =
oWord.InchesToPoints(2.5)
oTable.Columns.Item(1).Cells.Merge()
With
oTable.Cell(1,1).Range.InlineShapes.AddPicture(RPa th)
End With

Anyone understand why the pictures don't print
Oct 6 '08 #1
0 1437

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Sven Steinacker | last post by:
Hi, XSLT files generated by Microsoft InfoPath applied to an applicable XML file produces quite decent HTML presentations. At least with Mozilla and, of course, IE 6.0 the results look the same...
4
by: Lisa | last post by:
Hello, I have an ole object in my database that contains mostly pictures. I have this field in a report that I need to export to MS Word. When I export the report, I get everything accept the...
2
by: Rachel Suddeth | last post by:
Here is my scenario: I have a few custom controls that I set up on a form and tested setting properties and appearances. Then I added a couple references to the project which add classes I need to...
0
by: farseer | last post by:
Hi, I am asking this here in addition to the vstools.office group because i think the issue could possibly be schema or serilazation related... i have a word document which has a custom schema...
4
by: Jofio | last post by:
I am developing a picture gallery - pictures of landscapes and various other subjects. My site has a left panel consisting of thumbnails of pictures which when clicked displays the corresponding...
1
by: webgirl | last post by:
Hi everyone, I have a weird problem with some Word/Excel automation code that I run from Access (not sure if I should therefore post this in the Access forum..? Thought I'd try here first) ...
3
by: rudeman76 | last post by:
Hello, I am working on an incident form. I have 4 set text boxes and up to 4 drop-down boxes on the form. The user enters in the date then time. I have 4 option buttons for the user to select...
2
by: allan.s.palmer | last post by:
Hello, I have an asp.net pop up that is generating a Word document real time and sending it to the user by sending the appropriate response headers. When it is run on our development environment...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
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: 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
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
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
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,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.