could it be an issue with certain versions of win98?
Printable View
could it be an issue with certain versions of win98?
Try this :
VB Code:
Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpszOp As String, _ ByVal lpszFile As String, ByVal lpszParams As String, _ ByVal LpszDir As String, ByVal FsShowCmd As Long) _ As Long Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Const SW_SHOWNORMAL = 1 Private Sub Form_Load() StartDoc "mailto:?Subject=How? &Body=Thank you" End Sub Public Function StartDoc(DocName As String) As Long ShellExecute GetDesktopWindow(), "Open", DocName, "", "C:\", 1 End Function
I hate VB. I tried your code and it works perfect but the message that appears in the body section is quite a number of sentences, 531 characters to be precise and maybe because the ShellExecute method takes a strings as an argument, it limits it to 255 characters. I am in deep trouble if I can not get this to work as the deadline is this afternoon.
Thanks
A fixed-length string can store about 64,000 characters, and a variable length string can store about 2 billion characters.
I think you're safe :)
why is it working differently on different platforms?
on 2000pro the entire message is displayed in my email client, in NT it displays only 210 characters and in 98 I am not sure how many because when I ran the program with the entire message it did not work but when I ran it with a small sentence, it did.
I can only assume then that it is the "ShellExecute" fault.
Can anyone suggest a solution pls
is this a question for the api forum maybe?
Hmm.
Try putting the entire message into a String Variable first, and then passing that variable name into the API then...
unfortunatelly it did not work. It must be the api method