Hi Neal,
I want to call Word from a VB.NET progran, and send
auguments such as an array or to start word using a
tempplate.
I recommend asking this in one of the dotnet newsgroups, or
possibly in the vsnet.vstools.office newsgroup. I'm too new
to VB.NET, myself, to be able to help you very much.
Generally, NET works the same way as, say VB did. You can
use the New keyword or CreateObject to start the Word
application and assign it to an object variable. You then
use the usual Automation commmands to do what you need to
have done.
Just to give you an idea, it would go something like this
(but the qualifier namespaces I'm certain are NOT correct
unless you've done an Imports). You'd also need to set a
Reference to the Word object library for your project.
Dim appWord as Word.Application
appWord = New Word.Application
Dim doc as Word.Document =
appWord.Documents.Add(TemplatePath)
doc.Range.Text = "Hello World!"
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jan 24 2003)
http://www.mvps.org/word
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail