insert text into word document from vba

U

us271782

I'm trying to create a word document from within my ERP software using
VBA. The word doc needs to print an order number and part number which
is available via the screen object. In other words, I'm trying to take
the order number and part number from the on-screen fields and insert
them into a word doc, then print it. It doesn't need to be saved and
formatting is not critical. I'm a novice at Word, so please be
specific.

Thanks,
KB
 
F

Francis Dion

Hi,

Here is how you can do it using XpertDoc, a document production
engine:

1. You create your template using Microsoft Word.
2. From your ERP software, you use XpertDoc "AddProperty" function to
pass it the 2 values that you need.
3. You generate the document.

You can check out XpertDoc at www.xpertdoc.com.

Hope this helps!

Regards,
 
C

Cindy M -WordMVP-

Hi Us271782,

I guess the first question we'd need to ask is: do you already know how
to retrieve the screen data in your ERP software? If you do, you should
find plenty of coding examples at mvps.org/word on how to drop data that
you have in programming variables into Word documents. Most often,
bookmarks are used as the "target", although the information can also be
written to document Variables or document Properties, and docVariable
resp. DocProperty fields can be used to display it in the document.

Note that you probably would have gotten a more timely response had you
posted to the word.vba.beginners newsgroup.
I'm trying to create a word document from within my ERP software using
VBA. The word doc needs to print an order number and part number which
is available via the screen object. In other words, I'm trying to take
the order number and part number from the on-screen fields and insert
them into a word doc, then print it. It doesn't need to be saved and
formatting is not critical. I'm a novice at Word, so please be
specific.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep 30 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 :)
 

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