Re: Ping the VB (or something) gurus.



In message <74olpcF14c5fkU1@xxxxxxxxxxxxxxxxxx>, Krusty <dontwantany@xxxxxxxxxxxxxxx> writes
I've downloaded the source code for a small freebie ActiveX thingy
which does a mailmerge in Word using an XML file. It uses a form to let
you enter the XML & .dot file names & locations, & a button to make it
work its magic. It then creates a separate Word doccie for each record
in the XML.

I need it modified to take the filenames as command line input
parameters & run automatically without opening the form. Ideally I'd
like a third input parameter to give the option of merging to a single
document with a separate page for each record, like a traditional merge
in Word. I.e. I want to be able to do:

xml2word.exe C:\data\mysourcexml.xml C:\templates\mysourcetemplate.dot
single|multi

& it go off & do its stuff without any further input.

Anyone fancy having a look to see if it's possible?


Can't see why not bearing in mind this if you are definitely talking VB:

"Unlike C and C++, where Command Line Arguments are passed as an array of values to the executable program, in Visual Basic whatever follows the name of the executable program in the Run Window is passed as a single String value. What that means is that it's possible to pass more than one Command Line Argument, but 'parsing' (separating) the arguments is your responsibility---Visual Basic will not do it for you."

Civica do something similar with their 'Wordtool', but use .ini and .cfg files read at runtime to stipulate the parameters.




--

+-----------------------------------------------------------------+
| Pete Fisher at Home: Peter@xxxxxxxxxxxxxxxxxxxxx |
| Visit my Home Page : http://www.flarefox.com/Lesbordes |
| "Do not adjust your mind - there is a fault in the reality" |
+-----------------------------------------------------------------+
.



Relevant Pages

  • Executing "unknown" command line in C#
    ... I am writing an application that reads an XML file and displays the contents in various ways to the end user. ... The thing they have in common is that there is always a command line to grab a fresh copy of the XML file. ... Then they have to manually type in the arguments afterwards (well, not Y, since he has a dedicated .exe for grabbing). ... Do some magic on the string and figure out what part of it is the actual command, and what part is the arguments. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Manual opening of files .mdb
    ... > But I need to let this App reach out to another "data1.mdb" on other drives> or trhough network. ... > make a command in my App form that do the following job: ... > A solution on this problem, will alse make the next step in my app possible;> the user hav to be able to swith betweens separate projects, and the user> want to separate each projects in separate "data1.mdb" files. ...
    (microsoft.public.access.gettingstarted)
  • Re: Anyone interested in . . .
    ... as a separate command, callable from all programs ... rather than only as a menu option in a special add-on filer. ... command, to cover more than this one additional request: ... header, it can also store raw data if you provide a string, ...
    (comp.sys.hp48)
  • Re: Executing "unknown" command line in C#
    ... > fresh copy of the XML file. ... I have a string that needs to be ... And it works fine if you execute it from a DOS box, ... > my problem - to do this, I have to divide my command line into two ...
    (microsoft.public.dotnet.csharp.general)
  • Re: Attempt #3, adding a new command sfilter
    ... Why not just write simple 5-line script in your favorite scripting language that does just this and forget about it? ... IMHO this is one of the reasons we do have all those lightweight languages around - to avoid having separate utility and/or command line option for each and every particular situation. ... install the result as a separate new command if that would work ...
    (freebsd-current)