Results 1 to 4 of 4

Thread: does this exist? given ms-word doc, generate the VBA to create it?

  1. #1

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    does this exist? given ms-word doc, generate the VBA to create it?

    Hello -
    Just thought I'd put this out there to see in anyone has heard of such a thing. (I realize this is not a VB.NET question per se, although I will be doing some automation of Word in the VB project I have going.)

    I was wondering if there was some tool out there that, upon examining an existing Word document, generates the VBA script to create that document.

    Same concept as in SQL Server, where you can "Script Table as CREATE ...".
    "It's cold gin time again ..."

    Check out my website here.

  2. #2
    PowerPoster stanav's Avatar
    Join Date
    Jul 2006
    Location
    Providence, RI - USA
    Posts
    9,290

    Re: does this exist? given ms-word doc, generate the VBA to create it?

    A single line script
    Code:
    FileCopy source, destination
    Let us have faith that right makes might, and in that faith, let us, to the end, dare to do our duty as we understand it.
    - Abraham Lincoln -

  3. #3

    Thread Starter
    PowerPoster BruceG's Avatar
    Join Date
    May 2000
    Location
    New Jersey (USA)
    Posts
    2,657

    Re: does this exist? given ms-word doc, generate the VBA to create it?

    With all due respect, you are missing the point.

    Let's say there is an existing Word document with involved margin settings, bulleted lists, outlining, other formatting, whatever.

    The task at hand to programmatically generate such a document, with data from a database; i.e. a typical Word automation task.

    If you don't know the various Word methods off the top of your head, a typical way of getting a clue is to a record a macro as you attempt to recreate the formatting, so that you can then modify the generated VBA code accordingly.

    What I'm saying is that it would be nice to have a utility that looks at a Word document and generates the equivalent VBA code to produce it. In other words, "OK, here is the VBA code that would be required to produce a document like this." One could of course then take such code, modify it and incorporate it into the app that is tasked with dynamically producing such a document.
    "It's cold gin time again ..."

    Check out my website here.

  4. #4
    Frenzied Member Lightning's Avatar
    Join Date
    Oct 2002
    Location
    Eygelshoven
    Posts
    1,611

    Re: does this exist? given ms-word doc, generate the VBA to create it?

    It is a template (.dot(x)) file
    VB6 & C# (WCF LINQ) mostly


    If you need help with a WPF/WCF question post in the NEW WPF & WCF forum and we will try help the best we can

    My site

    My blog, couding troubles and solutions

    Free online tools

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width