I never really figure out how to work with Range objects in Word (or Excel), and it is hurting me now...
I am building a Word document using the .Selection.TypeText Method. When I am all done, I want to insert the contents of another document into the end of the one I just built. It seems easy enough, but I am having all sorts of trouble. Can someone who is familiar with this please help? Thanks! (see code)
-Brad
ps Currently, I can embed the document at the *beginning* of my document. I would like to embed it at the end.
With WordDoc
If .EmbedDocument And .EmbedDocumentPath <> "" Then
If Dir(.EmbedDocumentPath) <> "" Then
oWordDoc.InlineShapes.AddOLEObject , _
.EmbedDocumentPath
Else
MsgBox "The document to embed does not exist."
End If
End If
End With
I am building a Word document using the .Selection.TypeText Method. When I am all done, I want to insert the contents of another document into the end of the one I just built. It seems easy enough, but I am having all sorts of trouble. Can someone who is familiar with this please help? Thanks! (see code)
-Brad
ps Currently, I can embed the document at the *beginning* of my document. I would like to embed it at the end.
With WordDoc
If .EmbedDocument And .EmbedDocumentPath <> "" Then
If Dir(.EmbedDocumentPath) <> "" Then
oWordDoc.InlineShapes.AddOLEObject , _
.EmbedDocumentPath
Else
MsgBox "The document to embed does not exist."
End If
End If
End With