View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ed Ed is offline
external usenet poster
 
Posts: 399
Default Excel Macro to Auto-Populate a Word Template

Dan: If the data is the same data points each time, just different data,
then create a template in Word (a Word doc saved as ".dot") that has all of
your data point locations as bookmarks. In your Excel macro, set an object
to Word and open a new doc based on that template (see
http://word.mvps.org/FAQs/InterDev/C...ordFromXL.htm). Then iterate
through the document's Bookmarks collection and set your data into each
bookmark, then SaveAs with your doc name.

HTH
Ed

"Dan Thorman" wrote in message
...
I am using Excel to pull data together from multiple sources, and am trying
to set it up as, essentially, a dashboard for a user. I have it set so
that
the user hits a button and all the data that they need is automatically
pulled in to the workbook. However, I have a MS Word form that I would
like
the data to be pushed to, and I cannot figure out how to write the macro
to
automatically populate that particular form. I would normally just write
the
macro so that it created the document from scratch every time, but there
is a
LOT of static data in the form, and it changes often.

I am using Excel 2003

Can anyone provide an example of the code for how to do this? I am very
new
to VBA programming (and not a programmer by trade), so an example should
allow me to figure out how to make it work in this particular instance.

Thanks in advance for all your help!