![]() |
#1
|
|||
|
|||
![]()
I want to be able to insert multiple pictures with a macro, but I want to be able to adjust the column size of the table, and the amount of rows that fit in a single page.
I want to have a dialog appear, that asks for those values. I am currently using the code from https://www.msofficeforums.com/drawi...ument-all.html but I don't know what to add to make the table size change. I tried to change the values in oTbl in this line: Code:
Set oTbl = Selection.Tables.Add(Selection.Range, 2, 2) Thanks in advance |
#2
|
||||
|
||||
![]()
Cross-posted at: [SOLVED] Insert Multiple Pictures Into Table Word With Macro - Page 3
For cross-posting etiquette, please read: A message to forum cross posters - Excelguru The code in the link you posted also allows you to specify the row heights and, via those, the picture heights. Kindly provide a cross-post link @ VBA Express and notify them that you've found your answer here.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
![]()
You might find http://www.gmayor.com/photo_gallery_template.html useful. The table here fits the width between the margins so the column width will be determined by the (selected) number of columns that will fit between the current margins. Images will adapt to the width of the cells and the height is determined by the aspect ratio of the the imported image.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
||||
|
||||
![]() Quote:
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
||||
|
||||
![]()
Hi Paul
I took a slightly different approach in that the image size is determined by the width of the cells and thus the size of landscape oriented images inserted into the table. Portrait oriented images match the size of the landscape oriented images in the table, with vertical space added to the cells of landscape images, if there are mixed portrait and landscape images in the same row. Thus all the images are the same size regardless of orientation. The process also allows for images from different folders to be inserted in the same table and much more.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#6
|
||||
|
||||
![]()
Only if they have the same aspect ratio or its inverse! (just being picky).
Quote:
PS: I note your site refers to Google's Picasa. Google discontinued support for Picasa in March this year. For image re-scaling, alternatives include IrfanView.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
||||
|
||||
![]()
Picassa may be out of support, but it is still widely available and I happen to like it
![]() The photo gallery software was developed to work primarily with photographs, which tend to have the same aspect ratios. If users need to work with mixed aspect ratios it can be modified, but to date no one has asked for that.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
Tags |
macro, multiple pics, word 2007 |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
mescaL | Word VBA | 3 | 11-03-2014 10:51 PM |
![]() |
pachmarhi | Excel | 3 | 07-18-2014 09:57 PM |
![]() |
Hoxton118 | Word VBA | 6 | 04-03-2014 12:12 AM |
How to automatically insert pictures the same size in word 2010 | mindblaster | Word | 2 | 03-07-2013 11:42 AM |
Macro to Insert Text Into Cells Having Multiple Lines | revans611 | Excel Programming | 4 | 10-24-2011 10:15 AM |