创建程序的对象实例后,不能使用该程序的常量?(10分)

  • 主题发起人 17楼唐
  • 开始时间
1

17楼唐

Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
var
surfer,plot:variant;
begin
surfer:=createoleobject('surfer.application');
plot:=surferapp.documents.add(srfPlot);
编译提示:[Error] main.pas(332): Undeclared identifier: 'srfPlot'
怎么解决?
 
plot:=surferapp.documents.add(srfPlot);
那楼主这个srfPlot到底是在哪定义的呢?
 
这个srfPlot是什么东西啊?把定义show出来看看。
 
解释一下:Surfer是个绘图程序,add是surfer程序的一个方法,即object.Add(DocType)。
DocType的值有strPlot等。例如:
Dim Doc As Object
Set Doc = Docs.Add(DocType:=srfPlot)
 
呵呵,常量都是自己定义的

delphi应该可以导入的,搜索一下ocx/server下面的office代码
 
需要自己重新定义一下。
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部