Hi All,
I have written a code that finds default mail client and then i am using a function to open a mail client and populating it with values.The code works fine when i give some minimum value for the BODY field of the mail.But when i pass String Values with large amount of data the code is not working out.What is this problem due to?I have attached the code below - 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
-
-
Private Const SW_SHOW = 5
-
-
-
Public Function OpenEmail(ByVal EmailAddress As String, _
-
Optional Subject As String, Optional Body As String) _
-
As Boolean
-
Dim lWindow As Long
-
MsgBox Body
-
Dim lRet As Long
-
Dim sParams As String
-
sParams = EmailAddress
-
If LCase(Left(sParams, 7)) <> "mailto:" Then _
-
sParams = "mailto:" & sParams
-
If Subject <> "" Then sParams = sParams & "?subject=" & Subject
-
If Body <> "" Then
-
sParams = sParams & IIf(Subject = "", "?", "&")
-
sParams = sParams & "body=" & Body
-
MsgBox sParams
-
End If
-
lRet = ShellExecute(lWindow, "open", sParams, _
-
vbNullString, vbNullString, SW_SHOW)
-
OpenEmail = lRet = 0
-
End Function
-
-
-
Private Sub Command2_Click()
-
Call OpenEmail("ananth_r@xyz.com", "Mac-ID", software_result)
-
Unload Me
-
End Sub
please help me in this regard
2 940
Hi. What is software_result and where is it declared?
Two more questions: - In what way, precisely, does it "not work"? We need specific details.
- Are you sure the text you're passing doesn't include characters that might confuse things? For example, what if the text contained "?body=" or something?
Sign in to post your reply or Sign up for a free account.
Similar topics
by: sleepyant |
last post by:
Hi, I've posted this question on several forum but have no response. So I
hope anyone who have any idea what I'm talking about please give your
solution or advice.
My problem is I need to check...
|
by: Terencetrent |
last post by:
I having been using Access '97/2002 for about 4 years now and have
never really had the need or the time to learn visual basic. Well, I
think the time has finally come.
I need help with Visual...
|
by: Corepaul |
last post by:
Missing Help Files
When I enter "recordset" as the keyword and search the Visual Basic Help index,
I get many topics of interest in the resulting list. But there isn't any
information available...
|
by: robert d via AccessMonster.com |
last post by:
I'm looking at converting DAO to ADO in my app. All of my DAO connections
are of the following structure:
Dim wsName As DAO.Workspace
Dim dbName As DAO.Database
Dim rsName As DAO.Recordset
...
|
by: Hexman |
last post by:
Hello All,
I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm
using some VB6 code, .Net2003 code,...
|
by: perryschon |
last post by:
Can someone please help me out with the Visual Basic source code needed that allows configuration and usage of comm ports in any PC?
I am constructing an asynchronous serial communication RS-232...
|
by: Mark Dufour |
last post by:
Hi all,
I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an
optimizing Python-to-C++ compiler. Shed Skin allows for translation of
pure (unmodified), implicitly statically typed...
|
by: astrogirl77 |
last post by:
Hi,
I'm new to Python and am hoping to find help with coding a Python script, applet.
I code in an old version of Visual Basic 4.0, I have a simple app that is about 3 and a half pages of code...
|
by: astrogirl77 |
last post by:
I'm new to C++ and am hoping to find help with coding a simple C program, am wanting to obtain code and functioning exe's.
I code in an old version of Visual Basic 4.0, I have a simple app that...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |