在ASP中操作word

< HTML >  
< HEAD >  
< metaHTTP - EQUIV = " Content-Type " content = " text/html;charset=gb_2312-80 " >  
< linkrel = " stylesheet " type = " text/css " href = " edit.css " >  
< title > 保存为Word文档 </ title >  
</ HEAD >  
< scriptlanguage = " javascript " >  
window.returnValue
= 0  
</ script >  
< BODY >  
< fontcolor = " #000080 " >< strong >< divid = " strHint " align = " center " > 数据处理中,请等待... 

Dataprocessing,pleasewait...
</ div ></ strong ></ font >< fontcolor = " #0080C0 " >  


< scriptlanguage = " vbscript " >  

OnErrorResumeNext 

DimwApp 

SetwApp
= CreateObject ( " Word.Application "
IfErr.number
> 0 Then  
Alert
" 没法保存为Word文件,请正确安装Word97 "  
else  
wApp.visible
= True  
wApp.Documents.add 

wApp.Selection.TypeParagraph 
wApp.Selection.Font.Bold
= True  
wApp.Selection.TypeText
" ASP维护工作意见 "  

wApp.Selection.ParagraphFormat.Alignment
= 1  
rem居中 

wApp.Selection.TypeParagraph 
wApp.Selection.Font.Bold
= false  

wApp.Selection.TypeText
" --飞鸟 "  

wApp.Selection.TypeParagraph 

wApp.Selection.ParagraphFormat.LeftIndent
= wApp.CentimetersToPoints( 0
wApp.Selection.ParagraphFormat.FirstLineIndent
= wApp.CentimetersToPoints( 0.72 / 2 * 2

wApp.Selection.TypeParagraph 
wApp.Selection.Font.Bold
= false  
wApp.Selection.ParagraphFormat.Alignment
= 0  


wApp.Selection.TypeText
" 认真落实CHINAASP为网友解难题,上台阶。 "  
wApp.Selection.TypeParagraph 

rem居右 
wApp.Selection.TypeParagraph 
wApp.Selection.Font.Bold
= false  
wApp.Selection.TypeText
" 一九九九年五月 "  
wApp.Selection.TypeParagraph 

endif 
</ script >  
< center >  
< strong > 数据处理完毕! </ strong ></ center >  

< p >  
</ p >< divalign = center >< center >  
< inputtype = buttonclass = buttonfacename = cmdOK 
onclick
= " window.returnValue=0;window.close(); "  
value
= " 确定 " ></ center ></ div >  

</ BODY >  
</ HTML >  
 
<script type="text/javascript"> google_ad_client = "pub-8527320164371593"; google_ad_width = 728; google_ad_height = 90; google_ad_format = "728x90_as"; google_ad_type = "text_image"; //2006-11-09: asp.net google_ad_channel = "8786117784"; google_language = 'en'; </script><script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值