Microsoft Word AutoText Entries Into Recordset

J

John Henry

I am trying to retrieve a series of Microsoft Word Autotext entries and save
them into an ADODB.recordset that is connected to a SQL Server Database.
The Reference field is VarChar and the DocValue field is an image. It is an
image data type because some of the autotext entries have gifs, bolding, etc
that must be maintained.

My code is simple:

For Each atEntry In myTemplate.AutoTextEntries
With rstTable
.AddNew
.Fields("Reference").Value = atEntry.Name
.Fields("DocValue").Value = atEntry.Value
.Update
End With
Next

However, I receive the following error:
"multiple-step ole db operation generated errors" yada yada

Has anyone ever done this sort of work, or does anyone have any idea on how
to do it?

I also have to retrieve the values from the database and be able to insert
them into a document, but I will deal with that later.

Anyway, TIA

Greg
 

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