|
-
Aug 26th, 2005, 10:33 PM
#1
Thread Starter
Fanatic Member
How to open default emailer with attachment
Dear VB Expert,
How to open default emailer with attachment thru VB6's code? .. I need advise
Thanks & Regards
Winanjaya
-
Aug 26th, 2005, 10:45 PM
#2
Re: How to open default emailer with attachment
Are you trying to read a file with the default client, or send one?
-
Aug 26th, 2005, 10:59 PM
#3
Thread Starter
Fanatic Member
Re: How to open default emailer with attachment
Thanks for your prompt reply, I need to send .pdf thru default email program, when user click a button then it open default email program with .pdf attachment inserted automatically. any idea?
Thanks & Regards
Winanjaya
-
Aug 26th, 2005, 11:09 PM
#4
Re: How to open default emailer with attachment
I just searched, and found this. Hope it helps:
http://www.vbforums.com/showthread.php?t=79636
-
Aug 26th, 2005, 11:26 PM
#5
Thread Starter
Fanatic Member
Re: How to open default emailer with attachment
thanks, but how if they donot use Ms product (ie. eudora .. ) .. any comment?
thanks
Winanjaya
-
Aug 27th, 2005, 08:53 AM
#6
Thread Starter
Fanatic Member
Re: How to open default emailer with attachment
I tried below codes, it works but I cannot insert attachment.. could any body give me tips .. how to insert attachment(s) by using below "mailto" command.
Many thanks in advance
Regards
Winanjaya
Option Explicit
Private 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
Const SW_SHOW = 5
Private Sub OpenEmailer()
If InStr(pubEmail, "@") > 0 Then
ShellExecute Me.hwnd, "open", "mailto: [email protected]" & "?subject=" & App.Title & "&body=Hello World" , vbNullString, vbNullString, SW_SHOW
End If
End Sub
-
Aug 27th, 2005, 10:10 AM
#7
-
Aug 27th, 2005, 07:53 PM
#8
Thread Starter
Fanatic Member
Re: How to open default emailer with attachment
In development environment I am using Outlook Express, but my clients had many kinds of email client such as OE, Ms. Outlook, Eudora ..etc
any idea?
Thanks & Regards
Winanjaya
-
Aug 27th, 2005, 08:02 PM
#9
-
Aug 27th, 2005, 08:04 PM
#10
Re: How to open default emailer with attachment
I posted a MAPI example, but it requires Outlook, which comes with Windows.
-
Aug 27th, 2005, 08:12 PM
#11
Re: How to open default emailer with attachment
Outlook does not come with windows, but Outlook Express does. 
Your best solution is SMTP but you need access to a SMTP Server too.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 27th, 2005, 08:16 PM
#12
Re: How to open default emailer with attachment
Oh, you can't use OE for MAPI?
That could be a problem. I'll have to look at my mailto: section of an app.
Drag. I have MAPI in my app. Doesn't the installer include the files that it needs?
Last edited by dglienna; Aug 27th, 2005 at 08:20 PM.
-
Aug 27th, 2005, 08:18 PM
#13
Re: How to open default emailer with attachment
Um, no, I didnt say that but only clarifing that there is a difference between Outlook and Outlook Express. 
Since the poster wants to do attachments across all possible versions of a clients default email editor, then SMTP would be ideal.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 27th, 2005, 08:21 PM
#14
Re: How to open default emailer with attachment
Glad that's resolved. That would have been bad...
-
Aug 27th, 2005, 08:22 PM
#15
Re: How to open default emailer with attachment
 Originally Posted by dglienna
...I have MAPI in my app. Doesn't the installer include the files that it needs?
Depends on your packager and the references required. If you have any Office references then you cant add their dependancies because you can not distribut Office.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 27th, 2005, 08:40 PM
#16
Re: How to open default emailer with attachment
Nope, just the MAPI component
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|