Group:  Microsoft Word » microsoft.public.word.vba.customization
Thread: inserting multiple pictures and description

Geek News

inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/17/2008 5:54:48 AM
I am trying to create a word document by inserting (using vb) a series
of
pictures and descriptions on my document. I want to place them like
so:

----------
| |
| |
----------
Description
----------
| |
| |
----------
Description
----------
| |
| |
----------
Description


and so on down the page.....

Please help
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/17/2008 9:25:17 AM
See response in the vba.beginners newsgroup.

Please do not post the same question separately to multiple newsgroups.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
[Quoted Text]
>I am trying to create a word document by inserting (using vb) a series
> of
> pictures and descriptions on my document. I want to place them like
> so:
>
> ----------
> | |
> | |
> ----------
> Description
> ----------
> | |
> | |
> ----------
> Description
> ----------
> | |
> | |
> ----------
> Description
>
>
> and so on down the page.....
>
> Please help


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/17/2008 7:36:19 PM
On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> See response in the vba.beginners newsgroup.
>
> Please do not post the same question separately to multiple newsgroups.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >I am trying to create a word document by inserting (using vb) a series
> > of
> > pictures and descriptions on my document. I want to place them like
> > so:
>
> > ----------
> > |          |
> > |          |
> > ----------
> > Description
> > ----------
> > |          |
> > |          |
> > ----------
> > Description
> > ----------
> > |          |
> > |          |
> > ----------
> > Description
>
> > and so on down the page.....
>
> > Please help

I tried the mailmerge method but it's not what i'm looking for.
This document is a report that will be used several times a day, every
time different pictures, different number of pictures, other
descriptions.
This is why I am looking for a macro to automate this time taking job

Any other suggestion are welcome
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/17/2008 7:43:15 PM
What else is in the report?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> See response in the vba.beginners newsgroup.
>
> Please do not post the same question separately to multiple newsgroups.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >I am trying to create a word document by inserting (using vb) a series
> > of
> > pictures and descriptions on my document. I want to place them like
> > so:
>
> > ----------
> > | |
> > | |
> > ----------
> > Description
> > ----------
> > | |
> > | |
> > ----------
> > Description
> > ----------
> > | |
> > | |
> > ----------
> > Description
>
> > and so on down the page.....
>
> > Please help

I tried the mailmerge method but it's not what i'm looking for.
This document is a report that will be used several times a day, every
time different pictures, different number of pictures, other
descriptions.
This is why I am looking for a macro to automate this time taking job

Any other suggestion are welcome


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/17/2008 8:42:43 PM
On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> What else is in the report?
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>
>
>
> > See response in the vba.beginners newsgroup.
>
> > Please do not post the same question separately to multiple newsgroups.
>
> > --
> > Hope this helps.
>
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
>
> > Doug Robbins - Word MVP
>
> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> > >I am trying to create a word document by inserting (using vb) a series
> > > of
> > > pictures and descriptions on my document. I want to place them like
> > > so:
>
> > > ----------
> > > | |
> > > | |
> > > ----------
> > > Description
> > > ----------
> > > | |
> > > | |
> > > ----------
> > > Description
> > > ----------
> > > | |
> > > | |
> > > ----------
> > > Description
>
> > > and so on down the page.....
>
> > > Please help
>
> I tried the mailmerge method but it's not what i'm looking for.
> This document is a report that will be used several times a day, every
> time different pictures, different number of pictures, other
> descriptions.
> This is why I am looking for a macro to automate this time taking job
>
> Any other suggestion are welcome

It starts with an explaination why the report is created and the goal
(that sort of information) then the a table explaining the locations
visited and after that the pictures with the description underneath.
The report ending is some comments, findings and recommendations based
on assessment sheets in annexe

The document is a survey report.
Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/17/2008 8:47:38 PM
On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
[Quoted Text]
> On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>
>
>
> > What else is in the report?
>
> > --
> > Hope this helps.
>
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
>
> > Doug Robbins - Word MVP
>
> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> > On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > wrote:
>
> > > See response in the vba.beginners newsgroup.
>
> > > Please do not post the same question separately to multiple newsgroups.
>
> > > --
> > > Hope this helps.
>
> > > Please reply to the newsgroup unless you wish to avail yourself of my
> > > services on a paid consulting basis.
>
> > > Doug Robbins - Word MVP
>
> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> > > >I am trying to create a word document by inserting (using vb) a series
> > > > of
> > > > pictures and descriptions on my document. I want to place them like
> > > > so:
>
> > > > ----------
> > > > | |
> > > > | |
> > > > ----------
> > > > Description
> > > > ----------
> > > > | |
> > > > | |
> > > > ----------
> > > > Description
> > > > ----------
> > > > | |
> > > > | |
> > > > ----------
> > > > Description
>
> > > > and so on down the page.....
>
> > > > Please help
>
> > I tried the mailmerge method but it's not what i'm looking for.
> > This document is a report that will be used several times a day, every
> > time different pictures, different number of pictures, other
> > descriptions.
> > This is why I am looking for a macro to automate this time taking job
>
> > Any other suggestion are welcome
>
> It starts with an explaination why the report is created and the goal
> (that sort of information) then the a table explaining the locations
> visited and after that the pictures with the description underneath.
> The report ending is some comments, findings and recommendations based
> on assessment sheets in annexe
>
> The document is a survey report.

This is the macro I'm running for the moment but there is still of
manual work I have to do. This includes;
inserting:
- additional row under each picture;
- the descriptions and photo reference number

and I have to size the pictures ahead of time

here the macro/

Sub InsertAllPicsInFolder()
'
Dim tbl As Word.Table
Dim fso, f, fi
Dim szPicPath As String, lRowCounter As Long

szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
\P&V - Photography. & Video\New Folder"
lRowCounter = 1
Set tbl = ActiveDocument.Tables(1)
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder(szPicPath)
For Each fi In f.Files
Selection.InsertRowsBelow
Select Case Right(fi.Name, 3)
Case "bmp", "jpg", "gif"
If lRowCounter > tbl.Range.Cells.Count _
Then tbl.Rows.Add
ActiveDocument.InlineShapes.AddPicture _
FileName:=szPicPath & "\" & fi.Name, _
Range:=tbl.Range.Rows(lRowCounter).Range
lRowCounter = lRowCounter + 1
Case Else
End Select
Next fi

End Sub


Any help is welcome
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/17/2008 9:44:19 PM
From where do you get the description and photo reference number?

If they are available in some electronic format, your could either modify
your macro to insert them, or you could perform a directory or catalog mail
merge and then either add the other report sections to that document or
insert it into your report document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
[Quoted Text]
> On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
>> On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
>> wrote:
>>
>>
>>
>> > What else is in the report?
>>
>> > --
>> > Hope this helps.
>>
>> > Please reply to the newsgroup unless you wish to avail yourself of my
>> > services on a paid consulting basis.
>>
>> > Doug Robbins - Word MVP
>>
>> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
>> > On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
>> > wrote:
>>
>> > > See response in the vba.beginners newsgroup.
>>
>> > > Please do not post the same question separately to multiple
>> > > newsgroups.
>>
>> > > --
>> > > Hope this helps.
>>
>> > > Please reply to the newsgroup unless you wish to avail yourself of my
>> > > services on a paid consulting basis.
>>
>> > > Doug Robbins - Word MVP
>>
>> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>>
>> > > >I am trying to create a word document by inserting (using vb) a
>> > > >series
>> > > > of
>> > > > pictures and descriptions on my document. I want to place them like
>> > > > so:
>>
>> > > > ----------
>> > > > | |
>> > > > | |
>> > > > ----------
>> > > > Description
>> > > > ----------
>> > > > | |
>> > > > | |
>> > > > ----------
>> > > > Description
>> > > > ----------
>> > > > | |
>> > > > | |
>> > > > ----------
>> > > > Description
>>
>> > > > and so on down the page.....
>>
>> > > > Please help
>>
>> > I tried the mailmerge method but it's not what i'm looking for.
>> > This document is a report that will be used several times a day, every
>> > time different pictures, different number of pictures, other
>> > descriptions.
>> > This is why I am looking for a macro to automate this time taking job
>>
>> > Any other suggestion are welcome
>>
>> It starts with an explaination why the report is created and the goal
>> (that sort of information) then the a table explaining the locations
>> visited and after that the pictures with the description underneath.
>> The report ending is some comments, findings and recommendations based
>> on assessment sheets in annexe
>>
>> The document is a survey report.
>
> This is the macro I'm running for the moment but there is still of
> manual work I have to do. This includes;
> inserting:
> - additional row under each picture;
> - the descriptions and photo reference number
>
> and I have to size the pictures ahead of time
>
> here the macro/
>
> Sub InsertAllPicsInFolder()
> '
> Dim tbl As Word.Table
> Dim fso, f, fi
> Dim szPicPath As String, lRowCounter As Long
>
> szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> \P&V - Photography. & Video\New Folder"
> lRowCounter = 1
> Set tbl = ActiveDocument.Tables(1)
> Set fso = CreateObject("Scripting.FileSystemObject")
> Set f = fso.GetFolder(szPicPath)
> For Each fi In f.Files
> Selection.InsertRowsBelow
> Select Case Right(fi.Name, 3)
> Case "bmp", "jpg", "gif"
> If lRowCounter > tbl.Range.Cells.Count _
> Then tbl.Rows.Add
> ActiveDocument.InlineShapes.AddPicture _
> FileName:=szPicPath & "\" & fi.Name, _
> Range:=tbl.Range.Rows(lRowCounter).Range
> lRowCounter = lRowCounter + 1
> Case Else
> End Select
> Next fi
>
> End Sub
>
>
> Any help is welcome


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/18/2008 5:47:39 AM
On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> From where do you get the description and photo reference number?
>
> If they are available in some electronic format, your could either modify
> your macro to insert them, or you could perform a directory or catalog mail
> merge and then either add the other report sections to that document or
> insert it into your report document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>
> > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> >> On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> wrote:
>
> >> > What else is in the report?
>
> >> > --
> >> > Hope this helps.
>
> >> > Please reply to the newsgroup unless you wish to avail yourself of my
> >> > services on a paid consulting basis.
>
> >> > Doug Robbins - Word MVP
>
> >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com....
> >> > On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> > wrote:
>
> >> > > See response in the vba.beginners newsgroup.
>
> >> > > Please do not post the same question separately to multiple
> >> > > newsgroups.
>
> >> > > --
> >> > > Hope this helps.
>
> >> > > Please reply to the newsgroup unless you wish to avail yourself of my
> >> > > services on a paid consulting basis.
>
> >> > > Doug Robbins - Word MVP
>
> >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >> > > >I am trying to create a word document by inserting (using vb) a
> >> > > >series
> >> > > > of
> >> > > > pictures and descriptions on my document. I want to place them like
> >> > > > so:
>
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
>
> >> > > > and so on down the page.....
>
> >> > > > Please help
>
> >> > I tried the mailmerge method but it's not what i'm looking for.
> >> > This document is a report that will be used several times a day, every
> >> > time different pictures, different number of pictures, other
> >> > descriptions.
> >> > This is why I am looking for a macro to automate this time taking job
>
> >> > Any other suggestion are welcome
>
> >> It starts with an explaination why the report is created and the goal
> >> (that sort of information) then the a table explaining the locations
> >> visited and after that the pictures with the description underneath.
> >> The report ending is some comments, findings and recommendations based
> >> on assessment sheets in annexe
>
> >> The document is a survey report.
>
> > This is the macro I'm running for the moment but there is still of
> > manual work I have to do. This includes;
> > inserting:
> > - additional row under each picture;
> > - the descriptions and photo reference number
>
> > and I have to size the pictures ahead of time
>
> > here the macro/
>
> > Sub InsertAllPicsInFolder()
> > '
> >    Dim tbl As Word.Table
> >    Dim fso, f, fi
> >    Dim szPicPath As String, lRowCounter As Long
>
> >    szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> > \P&V - Photography. & Video\New Folder"
> >    lRowCounter = 1
> >    Set tbl = ActiveDocument.Tables(1)
> >    Set fso = CreateObject("Scripting.FileSystemObject")
> >    Set f = fso.GetFolder(szPicPath)
> >    For Each fi In f.Files
> >            Selection.InsertRowsBelow
> >        Select Case Right(fi.Name, 3)
> >            Case "bmp", "jpg", "gif"
> >                If lRowCounter > tbl.Range.Cells.Count _
> >                  Then tbl.Rows.Add
> >                ActiveDocument.InlineShapes.AddPicture _
> >                  FileName:=szPicPath & "\" & fi.Name, _
> >                  Range:=tbl.Range.Rows(lRowCounter)..Range
> >                lRowCounter = lRowCounter + 1
> >            Case Else
> >        End Select
> >      Next fi
>
> > End Sub
>
> > Any help is welcome

The description and photo reference are written in an excel file.
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/18/2008 6:34:29 AM
Is the filename for each picture there as well, or is the photo reference
the filename.

If you have the filename/reference or the filename, the reference and the
description as records in an Excel spreadsheet, you can certainly use a
directory of catalog type mail merge to produce the pictorial section of
your report.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> From where do you get the description and photo reference number?
>
> If they are available in some electronic format, your could either modify
> your macro to insert them, or you could perform a directory or catalog
> mail
> merge and then either add the other report sections to that document or
> insert it into your report document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>
> > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> >> On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> wrote:
>
> >> > What else is in the report?
>
> >> > --
> >> > Hope this helps.
>
> >> > Please reply to the newsgroup unless you wish to avail yourself of my
> >> > services on a paid consulting basis.
>
> >> > Doug Robbins - Word MVP
>
> >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> >> > On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> > wrote:
>
> >> > > See response in the vba.beginners newsgroup.
>
> >> > > Please do not post the same question separately to multiple
> >> > > newsgroups.
>
> >> > > --
> >> > > Hope this helps.
>
> >> > > Please reply to the newsgroup unless you wish to avail yourself of
> >> > > my
> >> > > services on a paid consulting basis.
>
> >> > > Doug Robbins - Word MVP
>
> >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >> > > >I am trying to create a word document by inserting (using vb) a
> >> > > >series
> >> > > > of
> >> > > > pictures and descriptions on my document. I want to place them
> >> > > > like
> >> > > > so:
>
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
> >> > > > ----------
> >> > > > | |
> >> > > > | |
> >> > > > ----------
> >> > > > Description
>
> >> > > > and so on down the page.....
>
> >> > > > Please help
>
> >> > I tried the mailmerge method but it's not what i'm looking for.
> >> > This document is a report that will be used several times a day,
> >> > every
> >> > time different pictures, different number of pictures, other
> >> > descriptions.
> >> > This is why I am looking for a macro to automate this time taking job
>
> >> > Any other suggestion are welcome
>
> >> It starts with an explaination why the report is created and the goal
> >> (that sort of information) then the a table explaining the locations
> >> visited and after that the pictures with the description underneath.
> >> The report ending is some comments, findings and recommendations based
> >> on assessment sheets in annexe
>
> >> The document is a survey report.
>
> > This is the macro I'm running for the moment but there is still of
> > manual work I have to do. This includes;
> > inserting:
> > - additional row under each picture;
> > - the descriptions and photo reference number
>
> > and I have to size the pictures ahead of time
>
> > here the macro/
>
> > Sub InsertAllPicsInFolder()
> > '
> > Dim tbl As Word.Table
> > Dim fso, f, fi
> > Dim szPicPath As String, lRowCounter As Long
>
> > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> > \P&V - Photography. & Video\New Folder"
> > lRowCounter = 1
> > Set tbl = ActiveDocument.Tables(1)
> > Set fso = CreateObject("Scripting.FileSystemObject")
> > Set f = fso.GetFolder(szPicPath)
> > For Each fi In f.Files
> > Selection.InsertRowsBelow
> > Select Case Right(fi.Name, 3)
> > Case "bmp", "jpg", "gif"
> > If lRowCounter > tbl.Range.Cells.Count _
> > Then tbl.Rows.Add
> > ActiveDocument.InlineShapes.AddPicture _
> > FileName:=szPicPath & "\" & fi.Name, _
> > Range:=tbl.Range.Rows(lRowCounter).Range
> > lRowCounter = lRowCounter + 1
> > Case Else
> > End Select
> > Next fi
>
> > End Sub
>
> > Any help is welcome

The description and photo reference are written in an excel file.


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/18/2008 6:54:36 PM
On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> Is the filename for each picture there as well, or is the photo reference
> the filename.
>
> If you have the filename/reference or the filename, the reference and the
> description as records in an Excel spreadsheet, you can certainly use a
> directory of catalog type mail merge to produce the pictorial section of
> your report.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
> On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>
>
>
> > From where do you get the description and photo reference number?
>
> > If they are available in some electronic format, your could either modify
> > your macro to insert them, or you could perform a directory or catalog
> > mail
> > merge and then either add the other report sections to that document or
> > insert it into your report document.
>
> > --
> > Hope this helps.
>
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
>
> > Doug Robbins - Word MVP
>
> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>
> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > >> wrote:
>
> > >> > What else is in the report?
>
> > >> > --
> > >> > Hope this helps.
>
> > >> > Please reply to the newsgroup unless you wish to avail yourself of my
> > >> > services on a paid consulting basis.
>
> > >> > Doug Robbins - Word MVP
>
> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > >> > wrote:
>
> > >> > > See response in the vba.beginners newsgroup.
>
> > >> > > Please do not post the same question separately to multiple
> > >> > > newsgroups.
>
> > >> > > --
> > >> > > Hope this helps.
>
> > >> > > Please reply to the newsgroup unless you wish to avail yourself of
> > >> > > my
> > >> > > services on a paid consulting basis.
>
> > >> > > Doug Robbins - Word MVP
>
> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> > >> > > >I am trying to create a word document by inserting (using vb) a
> > >> > > >series
> > >> > > > of
> > >> > > > pictures and descriptions on my document. I want to place them
> > >> > > > like
> > >> > > > so:
>
> > >> > > > ----------
> > >> > > > | |
> > >> > > > | |
> > >> > > > ----------
> > >> > > > Description
> > >> > > > ----------
> > >> > > > | |
> > >> > > > | |
> > >> > > > ----------
> > >> > > > Description
> > >> > > > ----------
> > >> > > > | |
> > >> > > > | |
> > >> > > > ----------
> > >> > > > Description
>
> > >> > > > and so on down the page.....
>
> > >> > > > Please help
>
> > >> > I tried the mailmerge method but it's not what i'm looking for.
> > >> > This document is a report that will be used several times a day,
> > >> > every
> > >> > time different pictures, different number of pictures, other
> > >> > descriptions.
> > >> > This is why I am looking for a macro to automate this time taking job
>
> > >> > Any other suggestion are welcome
>
> > >> It starts with an explaination why the report is created and the goal
> > >> (that sort of information) then the a table explaining the locations
> > >> visited and after that the pictures with the description underneath.
> > >> The report ending is some comments, findings and recommendations based
> > >> on assessment sheets in annexe
>
> > >> The document is a survey report.
>
> > > This is the macro I'm running for the moment but there is still of
> > > manual work I have to do. This includes;
> > > inserting:
> > > - additional row under each picture;
> > > - the descriptions and photo reference number
>
> > > and I have to size the pictures ahead of time
>
> > > here the macro/
>
> > > Sub InsertAllPicsInFolder()
> > > '
> > > Dim tbl As Word.Table
> > > Dim fso, f, fi
> > > Dim szPicPath As String, lRowCounter As Long
>
> > > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> > > \P&V - Photography. & Video\New Folder"
> > > lRowCounter = 1
> > > Set tbl = ActiveDocument.Tables(1)
> > > Set fso = CreateObject("Scripting.FileSystemObject")
> > > Set f = fso.GetFolder(szPicPath)
> > > For Each fi In f.Files
> > > Selection.InsertRowsBelow
> > > Select Case Right(fi.Name, 3)
> > > Case "bmp", "jpg", "gif"
> > > If lRowCounter > tbl.Range.Cells.Count _
> > > Then tbl.Rows.Add
> > > ActiveDocument.InlineShapes.AddPicture _
> > > FileName:=szPicPath & "\" & fi.Name, _
> > > Range:=tbl.Range.Rows(lRowCounter).Range
> > > lRowCounter = lRowCounter + 1
> > > Case Else
> > > End Select
> > > Next fi
>
> > > End Sub
>
> > > Any help is welcome
>
> The description and photo reference are written in an excel file.

Sorry for my ignorance but..how do i do that
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/19/2008 12:47:46 AM
When starting off to create a mail merge, select Directory as the type of
document that you want to create and then open the data source that contains
the filenames and the description.

In the mail merge main document, insert a two row, one column table and set
the height of the first row to the height that you want the picture. In the
cell in the first row, inserte the merge field that contains the filename of
the picture and in the second row, insert the merge field that contains the
description. Then press Alt+F9 to toggle on the display of the field codes
and the

<<filename>> - assuming that filename is the name of the field

will be replaced by

{ MERGEFIELD filename }

Select that field and press Ctrl+F9 so that you get

{ { MERGEFIELD filename } }

and then modify that as follows:

{ INCLUDEPICTURE "C:/foldername/{ MERGEFIELD filename }" }

replacing C:/foldername with the appropriate drive and path.

Use Alt+F9 again to toggle off the display of the field codes and then
execute the merge to a new document.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:d18d8e87-6855-40b4-8a9e-16dbf88329f4[ at ]w1g2000prk.googlegroups.com...
[Quoted Text]
> On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>> Is the filename for each picture there as well, or is the photo reference
>> the filename.
>>
>> If you have the filename/reference or the filename, the reference and the
>> description as records in an Excel spreadsheet, you can certainly use a
>> directory of catalog type mail merge to produce the pictorial section of
>> your report.
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
>> On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
>> wrote:
>>
>>
>>
>> > From where do you get the description and photo reference number?
>>
>> > If they are available in some electronic format, your could either
>> > modify
>> > your macro to insert them, or you could perform a directory or catalog
>> > mail
>> > merge and then either add the other report sections to that document or
>> > insert it into your report document.
>>
>> > --
>> > Hope this helps.
>>
>> > Please reply to the newsgroup unless you wish to avail yourself of my
>> > services on a paid consulting basis.
>>
>> > Doug Robbins - Word MVP
>>
>> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>>
>> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
>> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP"
>> > >> <d...[ at ]REMOVECAPSmvps.org>
>> > >> wrote:
>>
>> > >> > What else is in the report?
>>
>> > >> > --
>> > >> > Hope this helps.
>>
>> > >> > Please reply to the newsgroup unless you wish to avail yourself of
>> > >> > my
>> > >> > services on a paid consulting basis.
>>
>> > >> > Doug Robbins - Word MVP
>>
>> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
>> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP"
>> > >> > <d...[ at ]REMOVECAPSmvps.org>
>> > >> > wrote:
>>
>> > >> > > See response in the vba.beginners newsgroup.
>>
>> > >> > > Please do not post the same question separately to multiple
>> > >> > > newsgroups.
>>
>> > >> > > --
>> > >> > > Hope this helps.
>>
>> > >> > > Please reply to the newsgroup unless you wish to avail yourself
>> > >> > > of
>> > >> > > my
>> > >> > > services on a paid consulting basis.
>>
>> > >> > > Doug Robbins - Word MVP
>>
>> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>>
>> > >> > > >I am trying to create a word document by inserting (using vb) a
>> > >> > > >series
>> > >> > > > of
>> > >> > > > pictures and descriptions on my document. I want to place them
>> > >> > > > like
>> > >> > > > so:
>>
>> > >> > > > ----------
>> > >> > > > | |
>> > >> > > > | |
>> > >> > > > ----------
>> > >> > > > Description
>> > >> > > > ----------
>> > >> > > > | |
>> > >> > > > | |
>> > >> > > > ----------
>> > >> > > > Description
>> > >> > > > ----------
>> > >> > > > | |
>> > >> > > > | |
>> > >> > > > ----------
>> > >> > > > Description
>>
>> > >> > > > and so on down the page.....
>>
>> > >> > > > Please help
>>
>> > >> > I tried the mailmerge method but it's not what i'm looking for.
>> > >> > This document is a report that will be used several times a day,
>> > >> > every
>> > >> > time different pictures, different number of pictures, other
>> > >> > descriptions.
>> > >> > This is why I am looking for a macro to automate this time taking
>> > >> > job
>>
>> > >> > Any other suggestion are welcome
>>
>> > >> It starts with an explaination why the report is created and the
>> > >> goal
>> > >> (that sort of information) then the a table explaining the locations
>> > >> visited and after that the pictures with the description underneath.
>> > >> The report ending is some comments, findings and recommendations
>> > >> based
>> > >> on assessment sheets in annexe
>>
>> > >> The document is a survey report.
>>
>> > > This is the macro I'm running for the moment but there is still of
>> > > manual work I have to do. This includes;
>> > > inserting:
>> > > - additional row under each picture;
>> > > - the descriptions and photo reference number
>>
>> > > and I have to size the pictures ahead of time
>>
>> > > here the macro/
>>
>> > > Sub InsertAllPicsInFolder()
>> > > '
>> > > Dim tbl As Word.Table
>> > > Dim fso, f, fi
>> > > Dim szPicPath As String, lRowCounter As Long
>>
>> > > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
>> > > \P&V - Photography. & Video\New Folder"
>> > > lRowCounter = 1
>> > > Set tbl = ActiveDocument.Tables(1)
>> > > Set fso = CreateObject("Scripting.FileSystemObject")
>> > > Set f = fso.GetFolder(szPicPath)
>> > > For Each fi In f.Files
>> > > Selection.InsertRowsBelow
>> > > Select Case Right(fi.Name, 3)
>> > > Case "bmp", "jpg", "gif"
>> > > If lRowCounter > tbl.Range.Cells.Count _
>> > > Then tbl.Rows.Add
>> > > ActiveDocument.InlineShapes.AddPicture _
>> > > FileName:=szPicPath & "\" & fi.Name, _
>> > > Range:=tbl.Range.Rows(lRowCounter).Range
>> > > lRowCounter = lRowCounter + 1
>> > > Case Else
>> > > End Select
>> > > Next fi
>>
>> > > End Sub
>>
>> > > Any help is welcome
>>
>> The description and photo reference are written in an excel file.
>
> Sorry for my ignorance but..how do i do that


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/19/2008 1:15:44 PM
On 19 dec, 01:47, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> When starting off to create a mail merge, select Directory as the type of
> document that you want to create and then open the data source that contains
> the filenames and the description.
>
> In the mail merge main document, insert a two row, one column table and set
> the height of the first row to the height that you want the picture.  In the
> cell in the first row, inserte the merge field that contains the filename of
> the picture and in the second row, insert the merge field that contains the
> description.  Then press Alt+F9 to toggle on the display of the field codes
> and the
>
> <<filename>>   - assuming that filename is the name of the field
>
> will be replaced by
>
> { MERGEFIELD filename }
>
> Select that field and press Ctrl+F9 so that you get
>
> { { MERGEFIELD filename } }
>
> and then modify that as follows:
>
> { INCLUDEPICTURE "C:/foldername/{ MERGEFIELD filename }" }
>
> replacing C:/foldername with the appropriate drive and path.
>
> Use Alt+F9 again to toggle off the display of the field codes and then
> execute the merge to a new document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:d18d8e87-6855-40b4-8a9e-16dbf88329f4[ at ]w1g2000prk.googlegroups.com...
>
> > On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > wrote:
> >> Is the filename for each picture there as well, or is the photo reference
> >> the filename.
>
> >> If you have the filename/reference or the filename, the reference and the
> >> description as records in an Excel spreadsheet, you can certainly use a
> >> directory of catalog type mail merge to produce the pictorial section of
> >> your report.
>
> >> --
> >> Hope this helps.
>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
>
> >> Doug Robbins - Word MVP
>
> >> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >>news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com....
> >> On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> wrote:
>
> >> > From where do you get the description and photo reference number?
>
> >> > If they are available in some electronic format, your could either
> >> > modify
> >> > your macro to insert them, or you could perform a directory or catalog
> >> > mail
> >> > merge and then either add the other report sections to that document or
> >> > insert it into your report document.
>
> >> > --
> >> > Hope this helps.
>
> >> > Please reply to the newsgroup unless you wish to avail yourself of my
> >> > services on a paid consulting basis.
>
> >> > Doug Robbins - Word MVP
>
> >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com....
>
> >> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> >> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP"
> >> > >> <d...[ at ]REMOVECAPSmvps.org>
> >> > >> wrote:
>
> >> > >> > What else is in the report?
>
> >> > >> > --
> >> > >> > Hope this helps.
>
> >> > >> > Please reply to the newsgroup unless you wish to avail yourself of
> >> > >> > my
> >> > >> > services on a paid consulting basis.
>
> >> > >> > Doug Robbins - Word MVP
>
> >> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> >> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP"
> >> > >> > <d...[ at ]REMOVECAPSmvps.org>
> >> > >> > wrote:
>
> >> > >> > > See response in the vba.beginners newsgroup.
>
> >> > >> > > Please do not post the same question separately to multiple
> >> > >> > > newsgroups.
>
> >> > >> > > --
> >> > >> > > Hope this helps.
>
> >> > >> > > Please reply to the newsgroup unless you wish to avail yourself
> >> > >> > > of
> >> > >> > > my
> >> > >> > > services on a paid consulting basis.
>
> >> > >> > > Doug Robbins - Word MVP
>
> >> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >> > >> > > >I am trying to create a word document by inserting (using vb) a
> >> > >> > > >series
> >> > >> > > > of
> >> > >> > > > pictures and descriptions on my document. I want to place them
> >> > >> > > > like
> >> > >> > > > so:
>
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
>
> >> > >> > > > and so on down the page.....
>
> >> > >> > > > Please help
>
> >> > >> > I tried the mailmerge method but it's not what i'm looking for.
> >> > >> > This document is a report that will be used several times a day,
> >> > >> > every
> >> > >> > time different pictures, different number of pictures, other
> >> > >> > descriptions.
> >> > >> > This is why I am looking for a macro to automate this time taking
> >> > >> > job
>
> >> > >> > Any other suggestion are welcome
>
> >> > >> It starts with an explaination why the report is created and the
> >> > >> goal
> >> > >> (that sort of information) then the a table explaining the locations
> >> > >> visited and after that the pictures with the description underneath.
> >> > >> The report ending is some comments, findings and recommendations
> >> > >> based
> >> > >> on assessment sheets in annexe
>
> >> > >> The document is a survey report.
>
> >> > > This is the macro I'm running for the moment but there is still of
> >> > > manual work I have to do. This includes;
> >> > > inserting:
> >> > > - additional row under each picture;
> >> > > - the descriptions and photo reference number
>
> >> > > and I have to size the pictures ahead of time
>
> >> > > here the macro/
>
> >> > > Sub InsertAllPicsInFolder()
> >> > > '
> >> > > Dim tbl As Word.Table
> >> > > Dim fso, f, fi
> >> > > Dim szPicPath As String, lRowCounter As Long
>
> >> > > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> >> > > \P&V - Photography. & Video\New Folder"
> >> > > lRowCounter = 1
> >> > > Set tbl = ActiveDocument.Tables(1)
> >> > > Set fso = CreateObject("Scripting.FileSystemObject")
> >> > > Set f = fso.GetFolder(szPicPath)
> >> > > For Each fi In f.Files
> >> > > Selection.InsertRowsBelow
> >> > > Select Case Right(fi.Name, 3)
> >> > > Case "bmp", "jpg", "gif"
> >> > > If lRowCounter > tbl.Range.Cells.Count _
> >> > > Then tbl.Rows.Add
> >> > > ActiveDocument.InlineShapes.AddPicture _
> >> > > FileName:=szPicPath & "\" & fi.Name, _
> >> > > Range:=tbl.Range.Rows(lRowCounter).Range
> >> > > lRowCounter = lRowCounter + 1
> >> > > Case Else
> >> > > End Select
> >> > > Next fi
>
> >> > > End Sub
>
> >> > > Any help is welcome
>
> >> The description and photo reference are written in an excel file.
>
> > Sorry for my ignorance but..how do i do that

It works for the description but the picture is shown as an icon...how
can I change this?
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/21/2008 10:35:42 AM
Try Ctrl+A then F9

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:033f052c-1810-401d-ab9b-ef06138936d6[ at ]v39g2000pro.googlegroups.com...
On 19 dec, 01:47, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> When starting off to create a mail merge, select Directory as the type of
> document that you want to create and then open the data source that
> contains
> the filenames and the description.
>
> In the mail merge main document, insert a two row, one column table and
> set
> the height of the first row to the height that you want the picture. In
> the
> cell in the first row, inserte the merge field that contains the filename
> of
> the picture and in the second row, insert the merge field that contains
> the
> description. Then press Alt+F9 to toggle on the display of the field codes
> and the
>
> <<filename>> - assuming that filename is the name of the field
>
> will be replaced by
>
> { MERGEFIELD filename }
>
> Select that field and press Ctrl+F9 so that you get
>
> { { MERGEFIELD filename } }
>
> and then modify that as follows:
>
> { INCLUDEPICTURE "C:/foldername/{ MERGEFIELD filename }" }
>
> replacing C:/foldername with the appropriate drive and path.
>
> Use Alt+F9 again to toggle off the display of the field codes and then
> execute the merge to a new document.
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:d18d8e87-6855-40b4-8a9e-16dbf88329f4[ at ]w1g2000prk.googlegroups.com...
>
> > On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > wrote:
> >> Is the filename for each picture there as well, or is the photo
> >> reference
> >> the filename.
>
> >> If you have the filename/reference or the filename, the reference and
> >> the
> >> description as records in an Excel spreadsheet, you can certainly use a
> >> directory of catalog type mail merge to produce the pictorial section
> >> of
> >> your report.
>
> >> --
> >> Hope this helps.
>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
>
> >> Doug Robbins - Word MVP
>
> >> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >>news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
> >> On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> >> wrote:
>
> >> > From where do you get the description and photo reference number?
>
> >> > If they are available in some electronic format, your could either
> >> > modify
> >> > your macro to insert them, or you could perform a directory or
> >> > catalog
> >> > mail
> >> > merge and then either add the other report sections to that document
> >> > or
> >> > insert it into your report document.
>
> >> > --
> >> > Hope this helps.
>
> >> > Please reply to the newsgroup unless you wish to avail yourself of my
> >> > services on a paid consulting basis.
>
> >> > Doug Robbins - Word MVP
>
> >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>
> >> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> >> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP"
> >> > >> <d...[ at ]REMOVECAPSmvps.org>
> >> > >> wrote:
>
> >> > >> > What else is in the report?
>
> >> > >> > --
> >> > >> > Hope this helps.
>
> >> > >> > Please reply to the newsgroup unless you wish to avail yourself
> >> > >> > of
> >> > >> > my
> >> > >> > services on a paid consulting basis.
>
> >> > >> > Doug Robbins - Word MVP
>
> >> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> >> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP"
> >> > >> > <d...[ at ]REMOVECAPSmvps.org>
> >> > >> > wrote:
>
> >> > >> > > See response in the vba.beginners newsgroup.
>
> >> > >> > > Please do not post the same question separately to multiple
> >> > >> > > newsgroups.
>
> >> > >> > > --
> >> > >> > > Hope this helps.
>
> >> > >> > > Please reply to the newsgroup unless you wish to avail
> >> > >> > > yourself
> >> > >> > > of
> >> > >> > > my
> >> > >> > > services on a paid consulting basis.
>
> >> > >> > > Doug Robbins - Word MVP
>
> >> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> >> > >> > > >I am trying to create a word document by inserting (using vb)
> >> > >> > > >a
> >> > >> > > >series
> >> > >> > > > of
> >> > >> > > > pictures and descriptions on my document. I want to place
> >> > >> > > > them
> >> > >> > > > like
> >> > >> > > > so:
>
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
> >> > >> > > > ----------
> >> > >> > > > | |
> >> > >> > > > | |
> >> > >> > > > ----------
> >> > >> > > > Description
>
> >> > >> > > > and so on down the page.....
>
> >> > >> > > > Please help
>
> >> > >> > I tried the mailmerge method but it's not what i'm looking for.
> >> > >> > This document is a report that will be used several times a day,
> >> > >> > every
> >> > >> > time different pictures, different number of pictures, other
> >> > >> > descriptions.
> >> > >> > This is why I am looking for a macro to automate this time
> >> > >> > taking
> >> > >> > job
>
> >> > >> > Any other suggestion are welcome
>
> >> > >> It starts with an explaination why the report is created and the
> >> > >> goal
> >> > >> (that sort of information) then the a table explaining the
> >> > >> locations
> >> > >> visited and after that the pictures with the description
> >> > >> underneath.
> >> > >> The report ending is some comments, findings and recommendations
> >> > >> based
> >> > >> on assessment sheets in annexe
>
> >> > >> The document is a survey report.
>
> >> > > This is the macro I'm running for the moment but there is still of
> >> > > manual work I have to do. This includes;
> >> > > inserting:
> >> > > - additional row under each picture;
> >> > > - the descriptions and photo reference number
>
> >> > > and I have to size the pictures ahead of time
>
> >> > > here the macro/
>
> >> > > Sub InsertAllPicsInFolder()
> >> > > '
> >> > > Dim tbl As Word.Table
> >> > > Dim fso, f, fi
> >> > > Dim szPicPath As String, lRowCounter As Long
>
> >> > > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> >> > > \P&V - Photography. & Video\New Folder"
> >> > > lRowCounter = 1
> >> > > Set tbl = ActiveDocument.Tables(1)
> >> > > Set fso = CreateObject("Scripting.FileSystemObject")
> >> > > Set f = fso.GetFolder(szPicPath)
> >> > > For Each fi In f.Files
> >> > > Selection.InsertRowsBelow
> >> > > Select Case Right(fi.Name, 3)
> >> > > Case "bmp", "jpg", "gif"
> >> > > If lRowCounter > tbl.Range.Cells.Count _
> >> > > Then tbl.Rows.Add
> >> > > ActiveDocument.InlineShapes.AddPicture _
> >> > > FileName:=szPicPath & "\" & fi.Name, _
> >> > > Range:=tbl.Range.Rows(lRowCounter).Range
> >> > > lRowCounter = lRowCounter + 1
> >> > > Case Else
> >> > > End Select
> >> > > Next fi
>
> >> > > End Sub
>
> >> > > Any help is welcome
>
> >> The description and photo reference are written in an excel file.
>
> > Sorry for my ignorance but..how do i do that

It works for the description but the picture is shown as an icon...how
can I change this?


Re: inserting multiple pictures and description
asbest <alexander.craens[ at ]telenet.be> 12/21/2008 2:23:08 PM
On 21 dec, 11:35, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
wrote:
[Quoted Text]
> Try Ctrl+A then F9
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> news:033f052c-1810-401d-ab9b-ef06138936d6[ at ]v39g2000pro.googlegroups.com...
> On 19 dec, 01:47, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>
>
>
> > When starting off to create a mail merge, select Directory as the type of
> > document that you want to create and then open the data source that
> > contains
> > the filenames and the description.
>
> > In the mail merge main document, insert a two row, one column table and
> > set
> > the height of the first row to the height that you want the picture. In
> > the
> > cell in the first row, inserte the merge field that contains the filename
> > of
> > the picture and in the second row, insert the merge field that contains
> > the
> > description. Then press Alt+F9 to toggle on the display of the field codes
> > and the
>
> > <<filename>> - assuming that filename is the name of the field
>
> > will be replaced by
>
> > { MERGEFIELD filename }
>
> > Select that field and press Ctrl+F9 so that you get
>
> > { { MERGEFIELD filename } }
>
> > and then modify that as follows:
>
> > { INCLUDEPICTURE "C:/foldername/{ MERGEFIELD filename }" }
>
> > replacing C:/foldername with the appropriate drive and path.
>
> > Use Alt+F9 again to toggle off the display of the field codes and then
> > execute the merge to a new document.
>
> > --
> > Hope this helps.
>
> > Please reply to the newsgroup unless you wish to avail yourself of my
> > services on a paid consulting basis.
>
> > Doug Robbins - Word MVP
>
> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> >news:d18d8e87-6855-40b4-8a9e-16dbf88329f4[ at ]w1g2000prk.googlegroups.com...
>
> > > On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > > wrote:
> > >> Is the filename for each picture there as well, or is the photo
> > >> reference
> > >> the filename.
>
> > >> If you have the filename/reference or the filename, the reference and
> > >> the
> > >> description as records in an Excel spreadsheet, you can certainly use a
> > >> directory of catalog type mail merge to produce the pictorial section
> > >> of
> > >> your report.
>
> > >> --
> > >> Hope this helps.
>
> > >> Please reply to the newsgroup unless you wish to avail yourself of my
> > >> services on a paid consulting basis.
>
> > >> Doug Robbins - Word MVP
>
> > >> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >>news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
> > >> On 17 dec, 22:44, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> > >> wrote:
>
> > >> > From where do you get the description and photo reference number?
>
> > >> > If they are available in some electronic format, your could either
> > >> > modify
> > >> > your macro to insert them, or you could perform a directory or
> > >> > catalog
> > >> > mail
> > >> > merge and then either add the other report sections to that document
> > >> > or
> > >> > insert it into your report document.
>
> > >> > --
> > >> > Hope this helps.
>
> > >> > Please reply to the newsgroup unless you wish to avail yourself of my
> > >> > services on a paid consulting basis.
>
> > >> > Doug Robbins - Word MVP
>
> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>
> > >> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
> > >> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP"
> > >> > >> <d...[ at ]REMOVECAPSmvps.org>
> > >> > >> wrote:
>
> > >> > >> > What else is in the report?
>
> > >> > >> > --
> > >> > >> > Hope this helps.
>
> > >> > >> > Please reply to the newsgroup unless you wish to avail yourself
> > >> > >> > of
> > >> > >> > my
> > >> > >> > services on a paid consulting basis.
>
> > >> > >> > Doug Robbins - Word MVP
>
> > >> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
> > >> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP"
> > >> > >> > <d...[ at ]REMOVECAPSmvps.org>
> > >> > >> > wrote:
>
> > >> > >> > > See response in the vba.beginners newsgroup.
>
> > >> > >> > > Please do not post the same question separately to multiple
> > >> > >> > > newsgroups.
>
> > >> > >> > > --
> > >> > >> > > Hope this helps.
>
> > >> > >> > > Please reply to the newsgroup unless you wish to avail
> > >> > >> > > yourself
> > >> > >> > > of
> > >> > >> > > my
> > >> > >> > > services on a paid consulting basis.
>
> > >> > >> > > Doug Robbins - Word MVP
>
> > >> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>
> > >> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>
> > >> > >> > > >I am trying to create a word document by inserting (using vb)
> > >> > >> > > >a
> > >> > >> > > >series
> > >> > >> > > > of
> > >> > >> > > > pictures and descriptions on my document. I want to place
> > >> > >> > > > them
> > >> > >> > > > like
> > >> > >> > > > so:
>
> > >> > >> > > > ----------
> > >> > >> > > > | |
> > >> > >> > > > | |
> > >> > >> > > > ----------
> > >> > >> > > > Description
> > >> > >> > > > ----------
> > >> > >> > > > | |
> > >> > >> > > > | |
> > >> > >> > > > ----------
> > >> > >> > > > Description
> > >> > >> > > > ----------
> > >> > >> > > > | |
> > >> > >> > > > | |
> > >> > >> > > > ----------
> > >> > >> > > > Description
>
> > >> > >> > > > and so on down the page.....
>
> > >> > >> > > > Please help
>
> > >> > >> > I tried the mailmerge method but it's not what i'm looking for.
> > >> > >> > This document is a report that will be used several times a day,
> > >> > >> > every
> > >> > >> > time different pictures, different number of pictures, other
> > >> > >> > descriptions.
> > >> > >> > This is why I am looking for a macro to automate this time
> > >> > >> > taking
> > >> > >> > job
>
> > >> > >> > Any other suggestion are welcome
>
> > >> > >> It starts with an explaination why the report is created and the
> > >> > >> goal
> > >> > >> (that sort of information) then the a table explaining the
> > >> > >> locations
> > >> > >> visited and after that the pictures with the description
> > >> > >> underneath.
> > >> > >> The report ending is some comments, findings and recommendations
> > >> > >> based
> > >> > >> on assessment sheets in annexe
>
> > >> > >> The document is a survey report.
>
> > >> > > This is the macro I'm running for the moment but there is still of
> > >> > > manual work I have to do. This includes;
> > >> > > inserting:
> > >> > > - additional row under each picture;
> > >> > > - the descriptions and photo reference number
>
> > >> > > and I have to size the pictures ahead of time
>
> > >> > > here the macro/
>
> > >> > > Sub InsertAllPicsInFolder()
> > >> > > '
> > >> > > Dim tbl As Word.Table
> > >> > > Dim fso, f, fi
> > >> > > Dim szPicPath As String, lRowCounter As Long
>
> > >> > > szPicPath = "C:\Documents and Settings\alex.craens\Desktop\ERSH-HQ
> > >> > > \P&V - Photography. & Video\New Folder"
> > >> > > lRowCounter = 1
> > >> > > Set tbl = ActiveDocument.Tables(1)
> > >> > > Set fso = CreateObject("Scripting.FileSystemObject")
> > >> > > Set f = fso.GetFolder(szPicPath)
> > >> > > For Each fi In f.Files
> > >> > > Selection.InsertRowsBelow
> > >> > > Select Case Right(fi.Name, 3)
> > >> > > Case "bmp", "jpg", "gif"
> > >> > > If lRowCounter > tbl.Range.Cells.Count _
> > >> > > Then tbl.Rows.Add
> > >> > > ActiveDocument.InlineShapes.AddPicture _
> > >> > > FileName:=szPicPath & "\" & fi.Name, _
> > >> > > Range:=tbl.Range.Rows(lRowCounter).Range
> > >> > > lRowCounter = lRowCounter + 1
> > >> > > Case Else
> > >> > > End Select
> > >> > > Next fi
>
> > >> > > End Sub
>
> > >> > > Any help is welcome
>
> > >> The description and photo reference are written in an excel file.
>
> > > Sorry for my ignorance but..how do i do that
>
> It works for the description but the picture is shown as an icon...how
> can I change this?

I tried that but i keep getting the square with red coss.
I check the 'filename' but nothing changed when I updated the merge

any suggestions
Re: inserting multiple pictures and description
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 12/21/2008 11:00:54 PM
If you toggle on the display of the field codes (Alt+F9) what do you see?

See the following page of fellow MVP Graham Mayor's website:

http://www.gmayor.com/mail_merge_graphics.htm

Note that you can use a single / in place of the double \\

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"asbest" <alexander.craens[ at ]telenet.be> wrote in message
news:6e63073e-1d6f-4a3b-ab53-de1d398333af[ at ]w39g2000prb.googlegroups.com...
[Quoted Text]
> On 21 dec, 11:35, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
> wrote:
>> Try Ctrl+A then F9
>>
>> --
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP
>>
>> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> news:033f052c-1810-401d-ab9b-ef06138936d6[ at ]v39g2000pro.googlegroups.com...
>> On 19 dec, 01:47, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
>> wrote:
>>
>>
>>
>> > When starting off to create a mail merge, select Directory as the type
>> > of
>> > document that you want to create and then open the data source that
>> > contains
>> > the filenames and the description.
>>
>> > In the mail merge main document, insert a two row, one column table and
>> > set
>> > the height of the first row to the height that you want the picture. In
>> > the
>> > cell in the first row, inserte the merge field that contains the
>> > filename
>> > of
>> > the picture and in the second row, insert the merge field that contains
>> > the
>> > description. Then press Alt+F9 to toggle on the display of the field
>> > codes
>> > and the
>>
>> > <<filename>> - assuming that filename is the name of the field
>>
>> > will be replaced by
>>
>> > { MERGEFIELD filename }
>>
>> > Select that field and press Ctrl+F9 so that you get
>>
>> > { { MERGEFIELD filename } }
>>
>> > and then modify that as follows:
>>
>> > { INCLUDEPICTURE "C:/foldername/{ MERGEFIELD filename }" }
>>
>> > replacing C:/foldername with the appropriate drive and path.
>>
>> > Use Alt+F9 again to toggle off the display of the field codes and then
>> > execute the merge to a new document.
>>
>> > --
>> > Hope this helps.
>>
>> > Please reply to the newsgroup unless you wish to avail yourself of my
>> > services on a paid consulting basis.
>>
>> > Doug Robbins - Word MVP
>>
>> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> >news:d18d8e87-6855-40b4-8a9e-16dbf88329f4[ at ]w1g2000prk.googlegroups.com...
>>
>> > > On 18 dec, 07:34, "Doug Robbins - Word MVP" <d...[ at ]REMOVECAPSmvps.org>
>> > > wrote:
>> > >> Is the filename for each picture there as well, or is the photo
>> > >> reference
>> > >> the filename.
>>
>> > >> If you have the filename/reference or the filename, the reference
>> > >> and
>> > >> the
>> > >> description as records in an Excel spreadsheet, you can certainly
>> > >> use a
>> > >> directory of catalog type mail merge to produce the pictorial
>> > >> section
>> > >> of
>> > >> your report.
>>
>> > >> --
>> > >> Hope this helps.
>>
>> > >> Please reply to the newsgroup unless you wish to avail yourself of
>> > >> my
>> > >> services on a paid consulting basis.
>>
>> > >> Doug Robbins - Word MVP
>>
>> > >> "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >>news:4b849792-6ebc-4878-bbb1-9428d2c85cd4[ at ]a29g2000pra.googlegroups.com...
>> > >> On 17 dec, 22:44, "Doug Robbins - Word MVP"
>> > >> <d...[ at ]REMOVECAPSmvps.org>
>> > >> wrote:
>>
>> > >> > From where do you get the description and photo reference number?
>>
>> > >> > If they are available in some electronic format, your could either
>> > >> > modify
>> > >> > your macro to insert them, or you could perform a directory or
>> > >> > catalog
>> > >> > mail
>> > >> > merge and then either add the other report sections to that
>> > >> > document
>> > >> > or
>> > >> > insert it into your report document.
>>
>> > >> > --
>> > >> > Hope this helps.
>>
>> > >> > Please reply to the newsgroup unless you wish to avail yourself of
>> > >> > my
>> > >> > services on a paid consulting basis.
>>
>> > >> > Doug Robbins - Word MVP
>>
>> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >> >news:457eeedc-3ea1-413a-bc43-1c1da1d65615[ at ]e1g2000pra.googlegroups.com...
>>
>> > >> > > On 17 dec, 21:42, asbest <alexander.cra...[ at ]telenet.be> wrote:
>> > >> > >> On 17 dec, 20:43, "Doug Robbins - Word MVP"
>> > >> > >> <d...[ at ]REMOVECAPSmvps.org>
>> > >> > >> wrote:
>>
>> > >> > >> > What else is in the report?
>>
>> > >> > >> > --
>> > >> > >> > Hope this helps.
>>
>> > >> > >> > Please reply to the newsgroup unless you wish to avail
>> > >> > >> > yourself
>> > >> > >> > of
>> > >> > >> > my
>> > >> > >> > services on a paid consulting basis.
>>
>> > >> > >> > Doug Robbins - Word MVP
>>
>> > >> > >> > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >> > >> >news:e9b7cf5b-61cd-455d-b679-c63aac64184d[ at ]e1g2000pra.googlegroups.com...
>> > >> > >> > On 17 dec, 10:25, "Doug Robbins - Word MVP"
>> > >> > >> > <d...[ at ]REMOVECAPSmvps.org>
>> > >> > >> > wrote:
>>
>> > >> > >> > > See response in the vba.beginners newsgroup.
>>
>> > >> > >> > > Please do not post the same question separately to multiple
>> > >> > >> > > newsgroups.
>>
>> > >> > >> > > --
>> > >> > >> > > Hope this helps.
>>
>> > >> > >> > > Please reply to the newsgroup unless you wish to avail
>> > >> > >> > > yourself
>> > >> > >> > > of
>> > >> > >> > > my
>> > >> > >> > > services on a paid consulting basis.
>>
>> > >> > >> > > Doug Robbins - Word MVP
>>
>> > >> > >> > > "asbest" <alexander.cra...[ at ]telenet.be> wrote in message
>>
>> > >> > >> > >news:1c87d3e7-f57c-450d-84b3-14756bf383b0[ at ]q36g2000vbn.googlegroups.com...
>>
>> > >> > >> > > >I am trying to create a word document by inserting (using
>> > >> > >> > > >vb)
>> > >> > >> > > >a
>> > >> > >> > > >series
>> > >> > >> > > > of
>> > >> > >> > > > pictures and descriptions on my document. I want to place
>> > >> > >> > > > them
>> > >> > >> > > > like
>> > >> > >> > > > so:
>>
>> > >> > >> > > > ----------
>> > >> > >> > > > | |
>> > >> > >> > > > | |
>> > >> > >> > > > ----------
>> > >> > >> > > > Description
>> > >> > >> > > > ----------
>> > >> > >> > > > | |
>> > >> > >> > > > | |
>> > >> > >> > > > ----------
>> > >> > >> > > > Description
>> > >> > >> > > > ----------
>> > >> > >> > > > | |
>> > >> > >> > > > | |
>> > >> > >> > > > ----------
>> > >> > >> > > > Description
>>
>> > >> > >> > > > and so on down the page.....
>>
>> > >> > >> > > > Please help
>>
>> > >> > >> > I tried the mailmerge method but it's not what i'm looking
>> > >> > >> > for.
>> > >> > >> > This document is a report that will be used several times a
>> > >> > >> > day,
>> > >> > >> > every
>> > >> > >> > time different pictures, different number of pictures, other
>> > >> > >> > descriptions.
>> > >> > >> > This is why I am looking for a macro to automate this time
>> > >> > >> > taking
>> > >> > >> > job
>>
>> > >> > >> > Any other suggestion are welcome
>>
>> > >> > >> It starts with an explaination why the report is created and
>> > >> > >> the
>> > >> > >> goal
>> > >> > >> (that sort of information) then the a table explaining the
>> > >> > >> locations
>> > >> > >> visited and after that the pictures with the description
>> > >> > >> underneath.
>> > >> > >> The report ending is some comments, findings and
>> > >> > >> recommendations
>> > >> > >> based
>> > >> > >> on assessment sheets in annexe
>>
>> > >> > >> The document is a survey report.
>>
>> > >> > > This is the macro I'm running for the moment but there is still
>> > >> > > of
>> > >> > > manual work I have to do. This includes;
>> > >> > > inserting:
>> > >> > > - additional row under each picture;
>> > >> > > - the descriptions and photo reference number
>>
>> > >> > > and I have to size the pictures ahead of time
>>
>> > >> > > here the macro/
>>
>> > >> > > Sub InsertAllPicsInFolder()
>> > >> > > '
>> > >> > > Dim tbl As Word.Table
>> > >> > > Dim fso, f, fi
>> > >> > > Dim szPicPath As String, lRowCounter As Long
>>
>> > >> > > szPicPath = "C:\Documents and
>> > >> > > Settings\alex.craens\Desktop\ERSH-HQ
>> > >> > > \P&V - Photography. & Video\New Folder"
>> > >> > > lRowCounter = 1
>> > >> > > Set tbl = ActiveDocument.Tables(1)
>> > >> > > Set fso = CreateObject("Scripting.FileSystemObject")
>> > >> > > Set f = fso.GetFolder(szPicPath)
>> > >> > > For Each fi In f.Files
>> > >> > > Selection.InsertRowsBelow
>> > >> > > Select Case Right(fi.Name, 3)
>> > >> > > Case "bmp", "jpg", "gif"
>> > >> > > If lRowCounter > tbl.Range.Cells.Count _
>> > >> > > Then tbl.Rows.Add
>> > >> > > ActiveDocument.InlineShapes.AddPicture _
>> > >> > > FileName:=szPicPath & "\" & fi.Name, _
>> > >> > > Range:=tbl.Range.Rows(lRowCounter).Range
>> > >> > > lRowCounter = lRowCounter + 1
>> > >> > > Case Else
>> > >> > > End Select
>> > >> > > Next fi
>>
>> > >> > > End Sub
>>
>> > >> > > Any help is welcome
>>
>> > >> The description and photo reference are written in an excel file.
>>
>> > > Sorry for my ignorance but..how do i do that
>>
>> It works for the description but the picture is shown as an icon...how
>> can I change this?
>
> I tried that but i keep getting the square with red coss.
> I check the 'filename' but nothing changed when I updated the merge
>
> any suggestions


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net