标题:WordDocument小问题
只看楼主
hzx171
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-5-10
 问题点数:0 回复次数:0 
WordDocument小问题

while not adoquery3.Eof do
begin

temp:=format('%d.%s',[STH,adoquery3.FieldValues['nr']]);
WordDocument1.Range.InsertAfter(temp+#13+#13); //插入内容
//移入图片
if not tblobfield(adoquery3.FieldByName('ts')).IsNull then //图片移入 begin
//**********这里不知道为什么还要再重复一次,不然内容不能显示
temp:=format('%d.%s',[STH,adoquery3.FieldValues['nr']]);
WordDocument1.Range.InsertAfter(temp+#13+#13);
//****************************************************************
dbimage2.CopyToClipboard;
WordDocument1.Sentences.Last.Paste;
WordDocument1.Range.InsertAfter(#13);
end;

//stda.Add(adoquery3.FieldValues['da']); //记下每一小题的答案
STH:=STH+1;
adoquery3.Next;
end;

问题出在:WordDocument1.Sentences.Last.Paste这句,运行后出现下面的提示
---------------------------
Debugger Exception Notification
---------------------------
Project MO.exe raised exception class EOleException with message '命令失败'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------

请问应该怎么做呢?


搜索更多相关主题的帖子: WordDocument 
2006-05-10 14:29



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-63110-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017656 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved