else
wdapp.selection.paragraphformat.alignment = wdalignparagraphright
end if
end if
if i = 0 and (myrecord.fields.item(colloop).name = "sxh" or myrecord.fields.item(colloop).name = "顺序号") then
wdapp.selection.typetext ("序号")
else
wdapp.selection.typetext (cstr(myrecord.fields.item(colloop).value))
end if
if (i <> rowmax - 1 or (i = rowmax - 1 and colloop < colmax - 1)) then
wdapp.selection.moveright (wdcell)
end if
next
i = i + 1
myrecord.movenext
loop until myrecord.eof
wdapp.activedocument.saveas docfilename, 0, false, "", true, "", false, false, false, false, false
wdapp.quit
saveasword = 1
exit function
err_all:
set wdapp = nothing
saveasword = -1
outmessage = err.description
exit function
end function
好了,到此为止,我想你们对在vb中利用word宏命令开发asp组件,有了一些了解。只要多使用,就会很快熟悉的。
新闻热点
疑难解答