Hi everyone,

doing my first real VBA project for work and am a bit stuck. The basics is this:

I have a main document with all the information for 3 types of clients. Using a form, depending on which client type is selected a new document with the appropriate parts of information is generated. Meaning that from 1 document I have to generate 3 different documents.

All of this wouldn't be a problem if it was only text. I'm able to extract the text and insert it into the new file without problems. The problem is that there are multiple images in the document though. These don't get copied at the same time.

The only solution I could see would be to actually select different parts and copy the selections but I would obviously rather have it work by extracting the values of different sections.

What I have, that is copying only text looks something like this:

Private Sub Client1()
Dim i As Integer
Dim strText As String
'Copying and inserting Specific Paragraphs for Clients. Change I-Values in If statement to customize client-output
For i = 1 To 10
If i = 1 Or i = 3 Or i = 6 Then
strText = mdocOld.Sections(i).Range

mdocNew.Range.Sections.Add

mdocNew.Range.InsertAfter strText
End If
Next i
End Sub

Now obviously a String can only store text, so I'm a bit at a loss for what to do in order to store both text and images at the same time.

Thanks in advance for the help.