Jump to content

Recommended Posts

Posted

This is really annoying me.

 

We are printing out multiple reports that have been generated in SIMS but they are exported in an XML format. This is normally not a problem because the files can be opened in word and printed as you would any other normal document.

 

However, what I cant do is highlight multiple XML documents, right click and print.

 

Im sure this can be done, either with a registry hack or some other method.

 

Someone must be able to help me. I have tried renaming the extension to .doc as mentioned in another forum on here, and I still cant right click and print.

 

James

Posted

Any chance you can make a few random xml type documents from sims that does not have any data in them as none of us need to view or access the said data about students or whatever.

 

Can then have a play around with the said files and see if we can do anything with them

Posted
However, what I cant do is highlight multiple XML documents, right click and print.

 

You can always use AutoIt to put together a simple open-file, print-file, close-file script.

Posted
This has been mentioned in another thread but I'm still struggling. I want to find a way of combining a group of .xml files (all in the same folder and now renamed sequentially - File001.xml, File002.xml etc.) into one file that can be analysed. Each .xml file contains a small table (3-5 rows with 8 columns). I used to open each one individually and cut and paste the data. OK for a small group but now my head of 6th form wants all the students in it (380). There was a bit of code for a macro in the previous thread but it lost me. Can anyone make any suggestions?
Posted
I have the same problem here - if you rename the extensions to .doc they all seem to open fine and can print multiples without problems.
Posted
I have the same problem here - if you rename the extensions to .doc they all seem to open fine and can print multiples without problems.

I don't know why I bother?

Posted
That might have been one of my macros to paste pages together for printing? If so I can alter it slightly for you.

 

Chris: That would be great if you could. Even if you could steer me in the right direction I would be eternally grateful. A virtual pint in the virtual pub would be waiting for you!!!

Posted

ok, I have found another strange way round this problem.

 

In Word, click open, navigate to the folder where the xml files are and select them all. Click on tools and then there is an option to print.

 

Shown that by one of the women in the office who now thinks she knows more about computers than me!! damn her!!

  • Thanks 2
Posted

Another option which I've just tested on my machine here is going into the File Types, opening up DOC, copying all the settings for the Print option, Opening up XML, creating a New action and pasting all the Print settings from DOC into it, then it works how you want it. :)

 

So in my case, the options for printing were set as:

 

&Print

"C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE" /x /n /dde

[REM _DDE_Minimize][FileOpen("%1")][t=IsDocumentDirty()][FilePrint 0][setDocumentDirty t][DocClose]

WinWord

[FileOpen("%1")][FilePrint 0][FileExit 2]

System

 

(Each new line is a seperate field on the window)

 

Probably not supposed to do that, but it works :)

Posted
Oh good grief. I feel like a fool now. Just spent the afternoon with my head of ICT trying to write a macro to merge my .xml files. We gave up. I got home and typed Merge Multiple Documents into Google and got this: Combine and Merge Multiple Documents in Microsoft Office Word 2007 » My Digital Life It's so simple too. I couldn't merge all three hundred in one go but it can certainly manage 30 at a time on my laptop. Will try more with a more powerful PC at work.
  • 3 months later...
Posted
I have a vbscript to do this. Just make sure the word files are in a folder then drag the folder onto the script to print. Make sure the default printer is set first though! Might want to try with a couple of documents first, just to be safe :)

 

This script worked but now whenever I try to open an XML file, Word prompts me with a list of options to convert the file! Any fix for this???

Posted
Thanks for the quick work around! But is this the only solution? The script must of messed up some settings?

 

Regards

 

It's a very quick, simple fix, can't really get much easier than that!

  • 5 weeks later...
Posted
This script worked but now whenever I try to open an XML file, Word prompts me with a list of options to convert the file! Any fix for this???

 

Word Options > Advanced > Untick "Confirm file format conversion on open"

 

Thanks for the quick work around! But is this the only solution? The script must of messed up some settings?

 

Regards

 

It's a very quick, simple fix, can't really get much easier than that!

 

I just used that script today, from another thread where you reposted it @LosOjos , it does do something funny to convert settings. We're using Win7 with Office 2010. I guess the script was built for Office 2007, or it's just the way it's done, anyway, i fixed it on our setup with the following change to line 44:

 

myWord.Documents.Open filePath, False, True, False, , , False, , , 8, , True

 

I forget which one, i think it's the fourth parameter that asks if you want to allow the converter for non word files. Changing it to false fixed it. Without it set, Word still opens the files fine as they are associated, and SIMS will print and preview okay (well, as well as it does) without a hidden prompt popping under.

 

HTHs.

 

@altecsole - great script by the way - does the trick and resolves the issue with the order of documents being muddled up, using any other bulk print method, such as putting in the right click context menu hack etc.

  • Thanks 2
  • 11 months later...
Posted

Just wanted to put this on as I ran into this situation trying to convert the Infopath xml docs into a PDF writer.

 

I tried the right click print registry hack and modified it to open Infopath instead of Word. This ultimately failed due to the lack of switches I could find that would allow Infopath to open print close.

 

I tried the Bulk print vbs script on here. This did what it was supposed to but Word only pulls the XML raw code not the Infopath forms so it was not what i needed.

 

 

Finally I stumbled on a Powershell scritpt that works Perfectly. Credit here bsonposh .com /archives /468 /BSonPoSH

 

 

Printing Multiple InfoPath forms

 

 

Install details for novice users

Copy the Text between the dashed lines into Notepad. Then change the line containing "\\sharepoint.corp.com\Form_Folder" to the location of the folder needing converted for example "c:\sharepoint\Forms"

Close and Save the notepad. Now rename the .txt extention to ps1. Double Click and your off and running. FYI should you need to edit the PS1 file, Right Click Edit. The script will automatically launch the Powershell interface which you can edit in as well.

 

 

* Note if you are converting to PDF you will need a PDF writer set as the default printer. Your pdf printer should be configured to print out using the same name as the current name in Infopath so everything is kept orderly. Test on a small folder before trying a big converson.

 

---------------------------------------------------------------------------------------

 

Param($Path = "\\sharepoint.corp.com\Form_Folder",[switch]$verbose)

 

Write-Host

 

function Invoke-FormPrint

{

Param($InfoForm)

$shortname = $InfoForm.name

Write-Verbose " – FormPrint: Creating COM Object"

$infopath = New-Object -com InfoPath.Application -verbose:$false

Write-Verbose " – FormPrint: Calling Open(`$InfoForm.fullname,10)"

$infopath.XDocuments.Open($InfoForm.fullname,10) | out-null

Write-verbose " – FormPrint: Calling PrintOut()"

$infopath.XDocuments[0].printout()

sleep 10

Write-verbose " – FormPrint: Calling Quit()"

$infopath.quit()

if(!$?)

{

Write-Host " - Error printing Form: $shortname" -fore RED

}

else

{

Write-Host " - Successfully printed Form: $shortname" -fore Green

}

}

 

$erroractionpreference = "silentlycontinue"

 

if($verbose){$verbosepreference="continue";$erroractionpreference="continue"}

 

Write-Verbose " + Processing all Forms from: $path"

$Forms = dir $path "*.xml"

 

Write-Verbose " + $($Forms.count) Forms found"

Write-host " + Processing all $($Forms.count) Forms located at: $path" -fore White

 

foreach($Form in $Forms)

{

Write-Host " + Printing Form: $($Form.Name)" -fore White

Invoke-FormPrint $Form

}

 

 

-----------------------------------------------------------------------------------------------------------

 

 

Windows 7 with Office 2010

  • 1 year later...
Posted
ok, I have found another strange way round this problem.

 

In Word, click open, navigate to the folder where the xml files are and select them all. Click on tools and then there is an option to print.

 

Shown that by one of the women in the office who now thinks she knows more about computers than me!! damn her!!

 

 

I have exactly the same issue (I know this is an old thread, but I found it via google)...... I have no option to click on 'tools' when trying this option !

 

Any tips or ideas ?

 

Regards

 

Phil

Posted

@Admiral208 --> Not sure how related this is but thought I would post it up anyway, in windows 7 it restricts the amount of xml / pdf files to 15 that you can print in one go from the context menu, this can be adjusted in the registry, registry file as per below

 

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer]
"ShellState"=hex:24,00,00,00,30,28,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
 01,00,00,00,12,00,00,00,00,00,00,00,22,00,00,00
"CleanShutdown"=dword:00000000
"Browse For Folder Width"=dword:0000013e
"Browse For Folder Height"=dword:00000120
"ExplorerStartupTraceRecorded"=dword:00000001
"link"=hex:1e,00,00,00
"MultipleInvokePromptMinimum"=dword:000001f4

 

It is the "MultipleInvokePromptMinimum"=dword:000001f4

 

Something similar to this post : Solved Printing - Windows 7 Help Forums

Posted
I have exactly the same issue (I know this is an old thread, but I found it via google)...... I have no option to click on 'tools' when trying this option !

 

Any tips or ideas ?

 

Regards

 

Phil

 

I had the same issue - mentioned here http://www.edugeek.net/forums/windows-7/77599-right-click-print-multiple-word-docs.html#post696820

 

The same thread also has the hack @mac_shinobi mentions, - so it is relevant :)

 

I would use one of the other solutions provided in either this or that thread. The benefit of the vbscript method is that it prints in order, which isn't necessarily the case when you select all and use the right click option. For us, printing in alphabetical order was a big deal as we collate other info with the reports before sending home.

  • Thanks 1
  • 8 months later...
Posted

I have tried this script numerous times, but it doesn't quite work. It opens the Infopath form, sleeps for 10 seconds, closes it, opens the next one, etc., and completes the script. But it is not actually printing the form. I've tried it by setting my default printer to PDF, or just leaving it as a real printer. By putting a -noexit command at the end, I can view the messages on the screen when the script is complete, and they state that the forms were printed successfully. I'm not getting any error messages.

 

Am I doing something wrong? Once the Infopath form is displayed and open on the screen, it seems like the printing part would be easy. But I think the Printout() command is not working as expected.

 

I'm using Windows 7 Pro at work, Powershell Version 1.0.

 

Thanks for any advice!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...