I’m having a little trouble getting out of the gate with COM automation using EB.
In VB/VBA, if one wanted to perform simple automation of MS Word via COM, for example, one might write a snippet such as this:
Dim wdApp As Word.Application
Dim myDoc As Word.Document
Dim mywdRange As Word.Range
Set wdApp = New Word.Application â€ËÅ" Create the Word application object
wdApp.Visible = True
wdApp.WindowState = 1
Set myDoc = wdApp.Documents.Add â€ËÅ" Create a new document inside the word application
Set mywdRange = myDoc.Words(1)
mywdRange.Text = Range("F6") & " This is a test."
mywdRange.Font.Name = "Comic Sans MS"
mywdRange.Font.Size = 12
mywdRange.Font.ColorIndex = 5
mywdRange.Bold = True
If someone could show me code/procedure in EB that mimics the above code, so that I may study it, I’d be grateful. :)
Thanks,
-S
Hello,
I've attached the code for EB. Unfortunately I don't know what is Range("F6"), but all other is working.
You'll need to install the SDK headers in order to compile the code.
The file wordapp.inc contain only a bit of the whole Word interface.
Thanks, sapero - that's precisely what I was looking for.
-S