VB and VBA Users Source Code: Inserting pictures to certain row in a table
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Inserting pictures to certain row in a table
By:
elvado
Email (spam proof):
Email the originator of this post
Date:
Wednesday, May 22, 2002
Hits:
960
Category:
Office
Article:
'Insert pictures into row of a table into Word 2000 Document programmatically using VB6- Word Automation. Dim oWord As Word.Application Dim oDoc As Word.Document Dim oTable As Word.Table Set oWord = CreateObject("word.application") oWord.Visible = True Set oDoc = oWord.Documents.Add Dim r As Integer, c As Integer Set oTable = oDoc.Tables.Add(oDoc.Bookmarks("\endofdoc").Range, 3, 4) oTable.Range.ParagraphFormat.SpaceAfter = 6 For r = 1 To 3 For c = 1 To 4 oTable.Cell(r, c).Range.FormattedText.InlineShapes.AddPicture FileName:="Path\Filename.bmp", linktofile:=False, savewithdocument:=True Next Next oTable.Rows(1).Range.Font.Bold = True
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder