function NoteExport.hasDoc: Boolean;
var
doc: IDocument;
id: OleVariant;
begin
Result := False;
try
docview.Refresh;
doc := doccur;
if doc = nil then
begin
doc := docview.GetFirstDocument;
end
else
doc := docview.GetFirstDocument;
//doc := docview.GetNextDocument(doc);
{while (not VarIsNull(doc) and
(VarIsNull(doc.GetItemValue('ToArcYes')) or VarIsEmpty(doc.GetItemValue('ToArcYes')))) do
begin
doc := docview.GetNextDocument(doc);
end;}
doccur := doc;
if (doccur <> nil) and (not VarIsNull(doccur)) then
begin
Result := True;
end
else
doccur := nil;
except
SendMsg('结束:获取文档');
end;
end;
本文地址:[url]http://www.xszlo.com/article/2012-12-10/7619.html[/url],转发请保留这个地址,谢谢
var
doc: IDocument;
id: OleVariant;
begin
Result := False;
try
docview.Refresh;
doc := doccur;
if doc = nil then
begin
doc := docview.GetFirstDocument;
end
else
doc := docview.GetFirstDocument;
//doc := docview.GetNextDocument(doc);
{while (not VarIsNull(doc) and
(VarIsNull(doc.GetItemValue('ToArcYes')) or VarIsEmpty(doc.GetItemValue('ToArcYes')))) do
begin
doc := docview.GetNextDocument(doc);
end;}
doccur := doc;
if (doccur <> nil) and (not VarIsNull(doccur)) then
begin
Result := True;
end
else
doccur := nil;
except
SendMsg('结束:获取文档');
end;
end;
本文地址:[url]http://www.xszlo.com/article/2012-12-10/7619.html[/url],转发请保留这个地址,谢谢
本文介绍了一种使用Delphi进行文档处理的方法,包括如何通过刷新视图获取文档、判断文档是否存在等步骤。对于需要在Delphi环境下操作文档的开发者来说,提供了一个实用的参考案例。
1336

被折叠的 条评论
为什么被折叠?



