Putting data from sql server onto word form

D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

There's a number of things that you can do:

Insert bookmarks in the template from which the documents will be created
and insert the information into the .Range of the bookmark using

[DocumentObject].Bookmarks("[bookmarkname]").Range.InsertBefore SQLData

If you define the bookmark so that it contains a space, the data will be
inserted inside the bookmark

Insert { DOCVARIABLE "[varname]"} fields in the template from which the
documents will be created and used

[DocumentObject].Variables("[varname]").Value = SQLData
[DocumentObject].Fields.Update

If the data is going into the cells of tables, you can use the .Range of the
cells

[DocumentObject].Tables([#]).Cell([rownum], [colnum]).Range.InsertBefore
SQLData

If you are using formfields as in a protected form, you can use

[DocumentObject].FormFields("[bookmarkname]").Result = SQLData

There's horses for courses.

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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