I'm completely new to macros and I'm trying to do the following:

Import all images from a folder on the harddrive into a Word file - each having its own page and being resized to fill the page (A4 portrait) while still keeping its ratio.

I already managed to do the "import" part with each image gettings its own page with this code:

```
Sub BilderImport()
    Dim Path As String
    Dim Img As Object
    Dim fs As Object
    Dim f As Object
    Dim fc As Object
    Dim i As Integer
    Dim fsize As Integer

    Path = "C:\tmp"
    Set fs = CreateObject("Scripting.FileSystemObject")
    Set f = fs.GetFolder(Path)
    Set ff = f.Files
    i = 0
    fsize = ff.Count

    For Each Img In ff
        If Right(Img.Name, 4) = ".bmp" Or Right(Img.Name, 4) = ".jpg" Or Right(Img.Name, 4) = ".gif" Or Right(Img.Name, 4) = ".png" Then
            i = i + 1
            Selection.InlineShapes.AddPicture FileName:=Img 

            Selection.InsertBreak Type:=wdLineBreak 'Add file name below every img
            Selection.TypeText Text:=Img.Name

            If i < fsize Then 'No line break after the last img
                Selection.InsertBreak Type:=wdPageBreak 'Inserts line break after every img
            End If
        End If
    Next
End Sub

```

A problem I've now come across: Word also adds a line break after every image and if an image is already pretty tall, this line break jumps to the next page, which adds an extra empty page because of the break I already add.

How do I prevent that or check for it?