Force Word to open the newly created document in "print" view mode

Use this code when creating Word documents via HTML from LotusScript. It allows you to pass variables to the Word translation code upon first opening.
HTML • LotusScript • XML


'send browser trips
Print "Content-Type:application/download"
Print |Content-Disposition: attachment;filename="GigaResume Sample.doc"|	
	
Print |<html | & _ 
|xmlns:o='urn:schemas-microsoft-com:office:office' | & _
|xmlns:w='urn:schemas-microsoft-com:office:word'| & _ 
|xmlns='http://www.w3.org/TR/REC-html40'>|
	
'load the head and CSS
Print |<head>|
	
Print |<!--[if gte mso 9]>| & _
|<xml>| & _ 
|<w:WordDocument>| & _
|<w:View>Print</w:View>| & _
|<w:Zoom>90</w:Zoom>| & _ 
|<w:DoNotOptimizeForBrowser/>| & _
|</w:WordDocument>| & _
|</xml>| & _ 
|<![endif]-->|
	
Print |</head>|

Written by Frank Joseph Brefere III

Posted by fbrefere001 on Wednesday September 5, 2007