RE: Python vs Visual Basic

Discussion in 'Python' started by Robert Brewer, Oct 13, 2003.

  1. > I want to create a program that will ask a user a series of questions
    > and then generate a Microsoft Word document whose content is dictated
    > by the answers. I am not a professional programmer, and I understand
    > only a little about OO programming. Should I
    >
    > a) stick to -- *gasp* -- Visual Basic to accomplish my goal;
    >
    > b) use Python, with which I am somewhat familiar, and which I would
    > prefer to use; or
    >
    > c) find another hobby because I am only going to end up hurting
    > myself?


    I'm torn between a) and c). On the one hand, I like most people, and my
    kind, caring side wants to recommend c): that you run away screaming
    from Word-document generation. Literally: scream loud and long. It's the
    only way management will get the message.

    But then I realize that, if non-programmers like yourself don't take on
    tasks like this, then one of the highly-trained master craftsmen on this
    list will probably end up doing it. They'll get paid, of course, but
    Office automation is bottom-of-the-barrel in wage terms, while somehow
    being a slightly worse torture than struggling through the Malebolge in
    one's lead-lined cloak. So I might recommend doing it all in VBA within
    Word. I hear that overwrought, overdesigned, over-featured mass has some
    sort of Forms functionality.

    Hmm. Tough choice.


    Robert Brewer
    MIS
    Amor Ministries
     
    Robert Brewer, Oct 13, 2003
    #1
    1. Advertising

  2. Robert Brewer

    Orange Free Guest

    In article <>, Robert
    Brewer wrote:

    > So I might recommend doing it all in VBA within Word. I hear that
    > overwrought, overdesigned, over-featured mass has some sort of Forms
    > functionality.


    It does, and it is all very clunky. Simply creating linked fields to
    automate updates to names that occur several times through a document
    causes my disk to thrash!

    Nevertheless, I will probably take your advice. I've attempted
    similar tasks using LaTeX and Python, BTW, and I found it pretty easy
    to do what I wanted. What is more, LaTeX output looks better than its
    Word equivalent. But I need documents that my secretaries can work
    with after the documents have been generated by my Python script, and
    LaTeX source would just fry their brains. So I'm stuck with Word.

    Thanks, everyone, for your input.

    --
    John
     
    Orange Free, Oct 18, 2003
    #2
    1. Advertising

  3. Orange Free wrote:

    > In article <>, Robert
    > Brewer wrote:
    >
    >> So I might recommend doing it all in VBA within Word. I hear that
    >> overwrought, overdesigned, over-featured mass has some sort of Forms
    >> functionality.

    >
    > It does, and it is all very clunky. Simply creating linked fields to
    > automate updates to names that occur several times through a document
    > causes my disk to thrash!
    >
    > Nevertheless, I will probably take your advice. I've attempted
    > similar tasks using LaTeX and Python, BTW, and I found it pretty easy
    > to do what I wanted. What is more, LaTeX output looks better than its
    > Word equivalent. But I need documents that my secretaries can work
    > with after the documents have been generated by my Python script, and
    > LaTeX source would just fry their brains. So I'm stuck with Word.


    You could use Python and RTF: Microsoft Word can load RT docs, and
    even save in RTF, without too much trouble.


    Alex
     
    Alex Martelli, Oct 18, 2003
    #3
  4. Robert Brewer

    Tim Churches Guest

    On Sat, 2003-10-18 at 19:58, Alex Martelli wrote:
    > Orange Free wrote:
    >
    > > In article <>, Robert
    > > Brewer wrote:
    > >
    > >> So I might recommend doing it all in VBA within Word. I hear that
    > >> overwrought, overdesigned, over-featured mass has some sort of Forms
    > >> functionality.

    > >
    > > It does, and it is all very clunky. Simply creating linked fields to
    > > automate updates to names that occur several times through a document
    > > causes my disk to thrash!
    > >
    > > Nevertheless, I will probably take your advice. I've attempted
    > > similar tasks using LaTeX and Python, BTW, and I found it pretty easy
    > > to do what I wanted. What is more, LaTeX output looks better than its
    > > Word equivalent. But I need documents that my secretaries can work
    > > with after the documents have been generated by my Python script, and
    > > LaTeX source would just fry their brains. So I'm stuck with Word.

    >
    > You could use Python and RTF: Microsoft Word can load RT docs, and
    > even save in RTF, without too much trouble.


    Couldn't OpenOffice 1.1 and its PyUNO interface be used to generate MS
    Word files (and other formats)?

    --

    Tim C

    PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
    or at http://members.optushome.com.au/tchur/pubkey.asc
    Key fingerprint = 8C22 BF76 33BA B3B5 1D5B EB37 7891 46A9 EAF9 93D0



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQA/kc0MeJFGqer5k9ARAn9WAJ9SnvBY/Igj7C4RChxfcIvtYMzI/wCeNoPF
    wTmRc0zCIVxlwFShDi/9LXQ=
    =6Omr
    -----END PGP SIGNATURE-----
     
    Tim Churches, Oct 19, 2003
    #4
  5. Robert Brewer

    Orange Free Guest

    In article <>, Tim
    Churches wrote:

    > Couldn't OpenOffice 1.1 and its PyUNO interface be used to generate
    > MS Word files (and other formats)?


    Unfortunately, for the types of documents I produce, OpenOffice
    doesn't speak Word well enough.
     
    Orange Free, Oct 19, 2003
    #5
  6. Robert Brewer

    Tim Churches Guest

    On Sun, 2003-10-19 at 11:59, Orange Free wrote:
    > In article <>, Tim
    > Churches wrote:
    >
    > > Couldn't OpenOffice 1.1 and its PyUNO interface be used to generate
    > > MS Word files (and other formats)?

    >
    > Unfortunately, for the types of documents I produce, OpenOffice
    > doesn't speak Word well enough.


    I don't disbelieve you, but am curious what sort of documents OpenOffice
    1.1 can't produce as decent MS Word files?
    --

    Tim C

    PGP/GnuPG Key 1024D/EAF993D0 available from keyservers everywhere
    or at http://members.optushome.com.au/tchur/pubkey.asc
    Key fingerprint = 8C22 BF76 33BA B3B5 1D5B EB37 7891 46A9 EAF9 93D0



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.0.7 (GNU/Linux)

    iD8DBQA/khTOeJFGqer5k9ARApq9AKDQRK4XlTOu5TQnFOXmMsso6BuouACeKcks
    h71w2nk8y8HY2FUjyy0amZI=
    =JCLV
    -----END PGP SIGNATURE-----
     
    Tim Churches, Oct 19, 2003
    #6
  7. Tim Churches wrote:
    ...
    >> > LaTeX source would just fry their brains. So I'm stuck with Word.

    >>
    >> You could use Python and RTF: Microsoft Word can load RT docs, and
    >> even save in RTF, without too much trouble.

    >
    > Couldn't OpenOffice 1.1 and its PyUNO interface be used to generate MS
    > Word files (and other formats)?


    Yes (I'm a reasonably heavy user of both MS Office documents, and
    the new OpenOffice 1.1, and haven't met any docs giving me serious
    trouble yet). However, from a first cursory examination, PyUNO seems
    roughly as cumbersome to use as the MS Office COM object model (I
    suspect that in both cases a reasonable framework could be designed
    to ease typical tasks, but developing it is a substantial investment), so
    I would stick with RTF (for Word; CSV for Excel, etc) as much as feasible,
    since those text-centered file formats lend themselves to much easier
    processing, and particularly to templating, a very handy approach.


    Alex
     
    Alex Martelli, Oct 19, 2003
    #7
  8. Robert Brewer

    Orange Free Guest

    [OT] OpenOffice and Word

    In article <>, Tim
    Churches wrote:

    > I don't disbelieve you, but am curious what sort of documents
    > OpenOffice 1.1 can't produce as decent MS Word files?


    OpenOffice has a hard time with Word legal documents, which rely
    heavily on Word's (crappy) automatic paragraph numbering scheme, its
    (pretty good) blacklining facilities and its (bulky) cross-reference
    tools.
     
    Orange Free, Oct 19, 2003
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. M P
    Replies:
    6
    Views:
    551
    Joe Fallon
    Aug 7, 2004
  2. Stewart
    Replies:
    1
    Views:
    524
    Ken Cox [Microsoft MVP]
    Feb 24, 2006
  3. Anthony Moss

    visual basic from visual C++

    Anthony Moss, Dec 16, 2003, in forum: C++
    Replies:
    1
    Views:
    288
    Aggro
    Dec 16, 2003
  4. Engineer
    Replies:
    6
    Views:
    624
    Jeremy Bowers
    May 1, 2005
  5. hunkgym
    Replies:
    1
    Views:
    1,988
    =?Utf-8?B?TGVvbiBNYXluZQ==?=
    Oct 30, 2006
Loading...

Share This Page