Discussion:
insert text into word document from vba
(too old to reply)
us271782
2003-11-26 21:44:16 UTC
Permalink
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


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/
Francis Dion
2003-11-27 20:47:15 UTC
Permalink
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,
Post by 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
------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/
Cindy M -WordMVP-
2003-12-01 17:11:24 UTC
Permalink
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.
Post by 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.
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 :-)

Loading...