Open an existing Word file?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I wrote a VB.net program that import a text file, which I will parse and
place into arrays.
My question is how to open an existing Word file without the Dialog Box that
has a 4x10 table and place the array[] into the table ?

Thank you for any assistance.

CopynPaste
 
* "=?Utf-8?B?Q29weW5QYXN0ZQ==?= said:
I wrote a VB.net program that import a text file, which I will parse and
place into arrays.
My question is how to open an existing Word file without the Dialog Box that
has a 4x10 table and place the array[] into the table ?

Without what dialog box?

For office automation using .NET, take a look at
<URL:http://msdn.microsoft.com/office/>.
 
Hi,

Opening the Word file itself is easy; the harder part will be using the
array as input for the table.

Here's what I do: I need to select random accounts and place the current
receivable balances for those accounts into a Word merge letter which
displays each selected account and that account's balances. I use a sql
server sp to zap and then create a table, containing the data I need - name,
account #, 0-30 days, 31-60 days, etc. Then I created the Word doc and
created a macro that loads that table into a table that displays as
necessary, and then of course merges so that each customer has a page. When
I run the routine, I do the sp rebuild as I mentioned above and then I call
the Word doc and macro, thus:
Case "welcome.doc"

macroname_ = "/mwelcome"

longstringname_ = globalmsopath & "\winword.exe " & "f:\imcapps\docs\" &
mergeletterbox.Text & " " & macroname_

Shell(longstringname_, AppWinStyle.NormalFocus, False, -1)

Now this opens the Word doc but not into a dialog box, as you wish. I'm
pretty sure I could do that also, by calling it from the dialog box and
constraining Word and a child of that dialog box (but I haven't tried that).

HTH,

Bernie Yaeger
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top