drom
Well-known Member
- Joined
- Mar 20, 2005
- Messages
- 528
- Office Version
- 2021
- 2019
- 2016
- 2013
- 2011
- 2010
- 2007
Hi and Thanks in advance!
I have the following lines of code:
But If I open a blank word document (my intention is to insert a few object like a chart, a table a few lines of text etc...)
So after I have the blank word document open and selected... (I know this)
My question:
Thanks again
I have the following lines of code:
VBA Code:
Dim WordApp As Object: Set WordApp = GetObject(, "Word.Application")
Dim WordDoc As Object
Dim WordRng As Object 'Word.Range
Dim objSelection
If WordApp Is Nothing Then
Set WordApp = CreateObject("Word.Application")
End If
WordApp.Visible = True
Set WordDoc = WordApp.Documents.Add
WordDoc.Select
Set objSelection = WordApp.Selection
objSelection.TypeText ("This is my text in Word Document using Excel") & Chr(10) & Chr(10)
But If I open a blank word document (my intention is to insert a few object like a chart, a table a few lines of text etc...)
So after I have the blank word document open and selected... (I know this)
- If I insert a Chart ("I CAN do it, works fine)
My question:
- How can I insert after the inserted chart, table...
- 2/3 blank lines and select the last line?
Thanks again