Changeset 24169
- Timestamp:
- 2011-06-17T17:51:52+12:00 (12 years ago)
- Location:
- main/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/binaries/windows/bin/docx2html.vbs
r24166 r24169 4 4 ' http://www.nilpo.com/2008/06/windows-scripting/reading-word-documents-in-wsh/ - for grabbing just the text (cleaned of Word mark-up) from a doc(x) 5 5 ' http://msdn.microsoft.com/en-us/library/3ca8tfek%28v=VS.85%29.aspx - VBScript Functions (CreateObject etc) 6 ' http://msdn.microsoft.com/en-us/library/aa220734%28v=office.11%29.aspx - SaveAs Method. Expand "WdSaveFormat" section to see all the default filetypes Office 2003+ can save as 6 7 7 8 ' Error Handling: … … 18 19 ' 4. Try out this script on Windows 7 to see whether WSH is active by default, as it is on XP and Vista. 19 20 ' 5. What kind of error occurs if any when user tries to convert docx on a machine with an old version of Word (pre-docx/pre-Word 2007)? 20 ' 6. Ask Dr Bainbridge whether this script can or shouldn't replace word2html, since this launches all version of word as well I think. 21 ' 6. Ask Dr Bainbridge whether this script can or shouldn't replace word2html, since this can launch all versions of word (not just 2007) I think. 22 ' Unless some commands have changed? Including for other Office apps, in which case word2html would remain the correct program to use for those cases. 21 23 22 24 … … 124 126 Set objDoc = .ActiveDocument 125 127 126 ' Save as HTML 128 ' Save as HTML -- http://msdn.microsoft.com/en-us/library/aa220734%28v=office.11%29.aspx 127 129 objDoc.SaveAs outHTML, wdFormatFilteredHTML 128 130 -
main/trunk/greenstone2/bin/script/gsConvert.pl
r24166 r24169 797 797 $vbScript = &util::filename_cat($vbScript, "docx2html.vbs"); 798 798 $vbScript = "CScript //Nologo \"$vbScript\""; # launche with CScript for error output in STDERR 799 # //Nologo flag avoids Microsoft's opening/logo msgs 799 # //Nologo flag avoids Microsoft's opening/logo msgs 800 print STDERR "About to use windows scripting to process docx file $input_filename.\n"; 801 print STDERR " This may take some time. Please wait...\n"; 800 802 } 801 803 else { # old doc versions. use the usual VB executable word2html for the
Note:
See TracChangeset
for help on using the changeset viewer.