hi,
I can help you a little -
first, you should add this reference:
"Microsoft Word 10.0 Object Library"
After that, you can start working with Word objects.
---
This example inserts 10 lines of text into a new document.
- Documents.Add
-
-
Selection.Font.Color = wdColorBlue
-
Selection.Font.Bold = True
-
Selection.Text = "Hello! Try this word document..." & Chr(13)
-
Selection.MoveDown Unit:=wdParagraph, Count:=1
-
-
Selection.Font.Color = wdColorBlack
-
Selection.Font.Bold = false
-
-
For i = 1 To 10
-
Selection.Text = "Line" & Str(i) & Chr(13)
-
Selection.MoveDown Unit:=wdParagraph, Count:=1
-
Next i
You can also declare objects and try to work with them - for ex. :
Dim wApp As New Word.Application
Dim wDoc As New Word.Document
You can also save, open file, etc.... sorry - just search in the Help by typing F1 on each interesting command.
Good luck
Hi all! Pls answer my question, this is third time i am asking.....
I would like to write some data to m.s word document, and read data from ms word.
till now i used "files" in v.b 6.0, using "input","output" "open" "close" lke methods.... but i want to connect to M.S word document through v.b application, and i should be able to change fonts.. size etc... Pls provide me a sample example. it may be helpful to me..
Thanks in advance:
regards:
raghunadhs