Inspector "Insert Item" with Redemption

L

LuisE

I would like to prompt the "Insert Item" form in Excel and used the selected
item as a variable
All I have is the following code for Outlook that prompts a “Select Folderâ€
window. I know I have to create the reference to the SafeItem but other than
that I’m stuck.

Set appOutlook = CreateObject("Outlook.Application")
appOutlook.Session.Logon
Set nms = appOutlook.GetNamespace("MAPI")
Set fld = nms.PickFolder


Thanks in advance
 
E

Eric Legault [MVP - Outlook]

There is no way to access the Insert Item dialog through the Outlook Object
Model or any other API, including Redemption You can try the VBA SendKeys
statement, but good luck getting the keystrokes right if it works at all (it
rarely does with modal dialogs).

Your best option is to prompt the user to select the item in a folder, then
access ActiveExplorer.Selection to get the collection of selected items.

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault
 
L

LuisE

Thanks Eric
Your best option is to prompt the user to select the item in a folder, then
access ActiveExplorer.Selection to get the collection of selected items.

How would I do that?
 
E

Eric Legault [MVP - Outlook]

Use this as a reference:

Dim objItems As Outlook.Items
Dim objItem As Outlook.MailItem
Dim intX As Integer

Set objItems = ActiveExplorer.Selection

If Not objItems Is Nothing Then
For intX = 1 To objItems.Count
If objItems.Item(intX).Class = olMail Then
Set objItem = objItems.Item(intX)
'You know have one MailItem object
End If
Next
End If

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top