作成者カテゴリ返答の対象
公開
松葉優
01/24/1999 04:34 PM
文書リンクアイコン Notesからファイル名を指定して実行
実行エージェントを改良しました。

済みません。もっとシンプルに出来ました。
相変わらずです。

(Declarations)に
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Declare Function GetDesktopWindow Lib "user32" () As Long
' Windows API (Application Programming Interface) を関数(Function)として
' 宣言(Declaration) しています。
Declare Function ShellExecute Lib "shell32.dll" _
Alias "ShellExecuteA" (Byval hwnd As Long, _
Byval lpOperation As String, _
Byval lpFile As String, _
Byval lpParameters As String, _
Byval lpDirectory As String, _
Byval nShowCmd As Long) As Long
' Windows API (Application Programming Interface) を関数(Function)として
' 宣言(Declaration) しています。
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
をコピーします。

(Initialize)に
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Dim session As New NotesSession '変数 sessionに新しい Notesセッションを用意して、Script実行環境を設定します。
Dim workspace As New NotesUIWorkspace '変数 workspace に新しく現在のワークスペース環境を設定します。
Dim uidoc As NotesUIDocument '変数 uidoc を ワークスペースで現在開かれている文書 を格納できる変数として宣言します。
Dim file As String '変数 file を文字列として 宣言しています。

Set uidoc = workspace.CurrentDocument ' uidoc 変数に workspace(現在のワークスペース) の現在の文書をセットします。
file = uidoc.FieldGetText( "path" ) 'file 変数 に uidoc(現在の文書) の path フィールドの 値 を代入します。

Call ShellExecute(GetDesktopWindow, "open",file, Chr$(0),"",5) ' ShellExecute 関数を呼んでいます。
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
をコピーします。

こんなにシンプルに出来ましたね。


[Previous Main Document]
Notesからファイル名を指定して実行 (松葉優)
. . SHELL関数だとだめなのですか? (xxx)
. . . . notesにshell関数?? (足立)
. . . . . . ありますよ! (ゆう)
. . . . . . . . すみません。 (足立)
. . . . *.xls *.doc *.rtf *.html *.jpg *.gif などのファイルのことです。 (松葉優)
. . 実行エージェントを改良しました。 (松葉優) * 現在地 *
[Next Main Document]