URGENT Help please: InsertDatabase does not work in Word 2003

  • Thread starter Virginia Kirkendall
  • Start date
V

Virginia Kirkendall

Hi folks:

The following snippet worked from a WordXP template function but
doesn't work as expected in 2003.
######################################
sConn = "DSN=dsnPPTS;SERVER={Server-04};DATABASE=BACK;TRUSTED_CONNECTION=YES;"

With rQuote
.Collapse direction:=wdCollapseEnd
.InsertDatabase _
Format:=wdTableFormatGrid8, Style:=191, _
connection:=sConn, _
SQLStatement:=sSQL
.Rows(1).HeadingFormat = True
End With
######################################

In 2003 the Connect to DSN prompt is displayed at the InsertDatabase
line even though the dsn has been specified in the connection string.

Has anyone else seen this and why would it happen in 2003 but not XP?

Also, I tried using DataSource:=dsnPPTS and remove dsn from the
connection string, but got the following error:

****Operation cannot be completed because of display or database
engine failures.****

Hm?

Thanks - any comments are welcome.
 

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

Top