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? -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
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: | | Visit my Home Page : http://www.flarefox.com/Lesbordes | | "Do not adjust your mind - there is a fault in the reality" | +-----------------------------------------------------------------+
Is that the sound of you volunteering? A couple of the files have .vbp & .vbw extensions, so I presume so. -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
It's possible, but I'm not volunteering. I haven't touched VB in years, thank ****. Seeing as you have an ActiveX control, I think that the best bet would be to create a new stand-alone app that takes the command line parameters and then passes those to the ActiveX control to use itself.
Not really, though I have played about a bit with VB 2008 Express edition. I much prefer to drive OLE apps like Word from VFP, or if push really comes to shove crank up a VBA 'macro'. Still not volunteering, but as others have said, it's certainly possible. -- +----------------------------------------------------------------+ | Pete Fisher at Home: | | Voxan Roadster Gilera Nordwest * 2 Yamaha WR250Z | | Gilera GFR * 2 Moto Morini 2C/375 Morini 350 "Forgotten Error" | +----------------------------------------------------------------+
Buggroff! I am strictly a C++ (and to a lesser extent C#) person. I've never used Delphi - Borland's C++ class library was bad enough.
Emailed - with a couple of zips attached so let me know if you block them. -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
Done. -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
It's probably one of our ISPs blocking it due to the zips. I've renamed the zips to .jpg & tried again to viaopus. If that doesn't work, I'm: preston dot kemp gmail.com -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
Already? Blimey, that was quick! Weeellll, there's a shitload of plastering to do, & some tiling, & electrics, & foundations to be dug, &... etc. Or you could just email it back, & I'll try to break it! -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)
And you'd both be wrong - it works perfectly! -- Krusty '03 Tiger 955i '02 MV Senna (for sale) '96 Tiger (for sale) '79 Fantic Hiro 250 (for sale) '81 Corvette (for sale)