N
newjq
Unregistered / Unconfirmed
GUEST, unregistred user!
小弟是第一次调用OCX控件,
这个控件在VBScript调用语法是这样的:
VBScript:
dim DllWord
set DllWord = CreateObject("WordDll.clsWord"
DllWord.OpenFileName = "D:/1.doc"
DllWord.SaveFileName = "D:/1.doc"
DllWord.UserName = "王刚"
DllWord.ActionState = 0
DllWord.SaveLocalState = True
DllWord.SaveLocalFileName = "D:11.doc"
DllWord.Run
我转换成DELPHI
DLEPHI:
DllWord: Variant;
try
DllWord := CreateOleObject('WordDll.clsWord');
except
exit;
end;
try
DllWord.OpenFileName := 'D:/1.doc';
DllWord.SaveFileName := 'D:/1.doc';
DllWord.UserName := '王刚';
DllWord.ActionState := '0';
DllWord.SaveLocalState := True;
DllWord.SaveLocalFileName := 'D:11.doc';
DllWord.Run;
except
DllWord.quit;
exit;
end;
运行到 DllWord.Run时出错!请大侠们帮忙啊!!!
出错信息为:
Protection Error
Debugger detected - please close it down and restart!
Windows NT user: Please note that having the
WinIce/SoftIce service installed means that you are
runngin a debugger!
这个控件在VBScript调用语法是这样的:
VBScript:
dim DllWord
set DllWord = CreateObject("WordDll.clsWord"
DllWord.OpenFileName = "D:/1.doc"
DllWord.SaveFileName = "D:/1.doc"
DllWord.UserName = "王刚"
DllWord.ActionState = 0
DllWord.SaveLocalState = True
DllWord.SaveLocalFileName = "D:11.doc"
DllWord.Run
我转换成DELPHI
DLEPHI:
DllWord: Variant;
try
DllWord := CreateOleObject('WordDll.clsWord');
except
exit;
end;
try
DllWord.OpenFileName := 'D:/1.doc';
DllWord.SaveFileName := 'D:/1.doc';
DllWord.UserName := '王刚';
DllWord.ActionState := '0';
DllWord.SaveLocalState := True;
DllWord.SaveLocalFileName := 'D:11.doc';
DllWord.Run;
except
DllWord.quit;
exit;
end;
运行到 DllWord.Run时出错!请大侠们帮忙啊!!!
出错信息为:
Protection Error
Debugger detected - please close it down and restart!
Windows NT user: Please note that having the
WinIce/SoftIce service installed means that you are
runngin a debugger!