activePDF Toolkit 2011 API リファレンス
DeleteFile
テクニカル リファレンス
>
Toolkit オブジェクト
>
Toolkit メソッド
> DeleteFile
Glossary Item Box
説明:
ハード ディスクからファイルを削除します。
構文:
object
.
DeleteFile
FileName
戻り値:
値の型
説明 & 設定
Long
1 = 正常終了
0
= 異常終了
>0
= Windows API エラーに関連する番号
引数:
引数
値の型
説明 & 設定
object
N/A
オブジェクトのインスタンスを設定します。
FileName
String
削除するファイル (絶対パスで指定する必要があります)
例:
'DeleteFile Example
Set TK
=
CreateObject
("APToolkit.Object")
r
=
TK.OpenOutputFile
("DeleteFile.pdf")
'Set the font for the text
TK.SetFont
"Helvetica"
,
20
,
0
'Stamp Text onto the page
TK.PrintText
30
,
740
,
"Hello World"
,
0
TK.CloseOutputFile
If r
= "0"
Then msgbox
"PDF created successfully, PDF will now be deleted"
End If
'Delete the new created PDF
r
=
TK.DeleteFile
("DeleteFile.pdf")
If
r <> 1 Then
msgbox
"Failed to delete file: "
& r
End If
Set TK
=
Nothing