掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
エクスプローラのコピー、切り取りを判定したい。 (ID:108134)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
わざわざありがとうございます。 NSDNをみながらやってみたのですが、 Dim Path(2) As String Dim lop As Integer Dim oShell As Shell32.Shell Dim oFItem As Shell32.FolderItem Dim oFItems As Shell32.FolderItems Dim oFVerb As Shell32.FolderItemVerb Dim oFView As Shell32.ShellFolderView Path(0) = "C:\test" Path(1) = "C:\test2" Set oShell = CreateObject("Shell.Application") For lop = 0 To 1 Set oFItem = oShell.NameSpace(Path(lop)).Items.Item oFView.SelectItem oFItem, 1 Next Set oFItems = oFView.SelectedItems For Each oFVerb In oFItems.Verbs If oFVerb.Name Like "貼り付け*" Then oFVerb.DoIt Exit For End If Next Set oFItem = Nothing Set oShell = Nothing oFView.SelectItem oFItem, 1の行で 実行時エラー'91': オブジェクト変数またはWithブロック変数が設定されていません。 がでてさきに進みません。 SelectItemの引数が違うと思うのですが、 ShellFolderView.SelectItem(vItem, dwFlags) Parameters vItem Required. The FolderItem object for which the selection state will be set. VItemは、どのようにして取得するのでしょうか? FolderItemでは、ない?
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2020 Takeshi Okamoto All Rights Reserved.