Hi Ashish,

Thanks for the reply, I have used the below code to get the selected mails
in the excel as icons. Please check it out and give any suggestion if we
can make it better

Sub Macro1()
'
' Macro1 Macro
'
Dim path As String
Dim lf As New Collection
'Dim ab As String
ab = Application.GetOpenFilename(, , "Select Files", , True)
If IsArray(ab) = False Then
MsgBox "No Files Selected", vbCritical, "Files Not Selected"
Exit Sub
Else
j = 50
For i = LBound(ab) To UBound(ab)
'
    ActiveSheet.OLEObjects.Add(Filename:=ab(i), _
        Link:=False, DisplayAsIcon:=True, IconFileName:= _
        "C:\WINDOWS\system32\Packager.exe", IconIndex:=0,
IconLabel:=Mid(ab(i), InStrRev(ab(i), "\") + 1, Len(ab(i)))).Select

    Selection.ShapeRange.Height = 20#
    Selection.ShapeRange.Width = 50#
    Selection.ShapeRange.IncrementLeft 1.5
    Selection.ShapeRange.IncrementTop 55.5 + j
j = j + 50
Next i
End If

End Sub

On Thu, Nov 29, 2012 at 9:05 PM, ashish koul <koul.ash...@gmail.com> wrote:

> can u share the sample file
>
> Also visit
>
> http://msdn.microsoft.com/en-us/library/office/aa174259(v=office.11).aspx
>
> http://www.java2s.com/Code/VBA-Excel-Access-Word/Data-Type/CreatingCompoundDocumentsProgrammaticallyUsingOleObjects.htm
>
> http://vba2008.wordpress.com/2008/10/17/adding-an-ole-object-command-button-to-a-worksheet-using-excel-vba/
>
>
>
> On Wed, Nov 28, 2012 at 6:02 PM, Shaik Waheed <waheedb...@gmail.com>wrote:
>
>> Hi All,
>>
>> I need to insert multiple mail objects into excel. I have around hundred
>> of mails in a folder in my outlook. I have tried it to save individually
>> and then insert, but its a time consuming process, If you guys can suggest
>> a better way to get this done will be great.
>>
>> Thanks,
>> Waheed
>>
>>
>> --
>> Join official Facebook page of this forum @
>> https://www.facebook.com/discussexcel
>>
>> FORUM RULES
>>
>> 1) Use concise, accurate thread titles. Poor thread titles, like Please
>> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
>> will not get quick attention or may not be answered.
>> 2) Don't post a question in the thread of another member.
>> 3) Don't post questions regarding breaking or bypassing any security
>> measure.
>> 4) Acknowledge the responses you receive, good or bad.
>> 5) Jobs posting is not allowed.
>> 6) Sharing copyrighted material and their links is not allowed.
>>
>> NOTE : Don't ever post confidential data in a workbook. Forum owners and
>> members are not responsible for any loss.
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "MS EXCEL AND VBA MACROS" group.
>> To post to this group, send email to excel-macros@googlegroups.com.
>> To unsubscribe from this group, send email to
>> excel-macros+unsubscr...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>>
>>
>>
>
>
>
> --
> *Regards*
> * *
> *Ashish Koul*
>
>
>  *Visit*
> *http://www.excelvbamacros.com/*
> *http://www.accessvbamacros.com/*
>
> P Before printing, think about the environment.
>
>
>
> --
> Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To post to this group, send email to excel-macros@googlegroups.com.
> To unsubscribe from this group, send email to
> excel-macros+unsubscr...@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros?hl=en.
>
>
>

-- 
Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To post to this group, send email to excel-macros@googlegroups.com.
To unsubscribe from this group, send email to 
excel-macros+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros?hl=en.


Reply via email to