 | 
06-Nov-2005, 12:37 PM
|  | Guest | | | | | | | | | | Send email from data access form - Subject Problem I am trying to create an email send from a data access form.
No problem to enter the address:- just enter mailto:xyx@xxxx.com in the
email address field.
No problem to display required text in the Hyperlink field on the form -
Hyperlink.ControlSource: Expr2: "email Web Application Job No " & [JobCode]
(where JobCode is another field (integer) on the form) eg. "email Web Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/6778-send-email-data-access-form-subject.html
Application Job No 1333" ......
But how can I get the same string to concatenate and display correctly in
the "Subject" Field of the Hyperlink / new email, without resorting to
separate script?
It looks like ought to be possible but I just cannot make it work.
Any ideas?
If it is not possible - has anybody got a code snippet I could insert?
Help please
mike Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778 Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh! | 
06-Nov-2005, 12:37 PM
|  | Guest | | | | | | | | | | RE: Send email from data access form - Subject Problem Here is an example of a code snippet, you will need to include the outlook Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
refernce library.
The biggest problem with linking e-mails to outlook, are the various changes
Microsoft keep making to outlook in service packs, which tends to make the
whole process more difficult.
The following is fairly basic but should get you started. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
Sub Mail_Send(Subject As String, Body As String, ToAddress As String,
DatabaseFile As String)
Dim objOL As Outlook.Application
Dim Trymail As Integer
Trymail = 0
RetryMail:
Trymail = Trymail + 1
On Error Resume Next
Set objOL = GetObject(, "Outlook.Application")
If Err.Number <> 0 Then
MsgBox "Start Your EMail System The Press OK", vbInformation, "EMail
Not Running"
If Trymail > 5 Then
MsgBox "Aborting Operation Unable To Start E-Mail"
Exit Sub
End If
GoTo RetryMail
End If
On Error GoTo 0
Dim ObjFolder As Outlook.MAPIFolder
Dim objNameSpace As Outlook.NameSpace
Set objNameSpace = objOL.GetNamespace("MAPI")
Call objNameSpace.Logon("Microsoft Outlook", "", False, True)
' Set ObjFolder = objNameSpace.GetDefaultFolder(olFolderInbox)
' ObjFolder.Display
Set objMail = objOL.CreateItem(olMailItem)
objMail.Subject = Subject
objMail.Body = Body
objMail.To = ToAddress
objMail.Display
Set objOL = Nothing
End Sub
Hope this helps. | 
07-Nov-2005, 11:25 AM
|  | Guest | | | | | | | | | | Re: Send email from data access form - Subject Problem Andy,
Thanks for the reply and code snippet....
But are you saying that I definitely can't set the subject in Href using
field information
eg.mailto:dfdfdhdhh@com?Subject=DataAccesssPages!M yDataAccessPage!Hypperlink
..text?
Please confirm Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
Mike
"Andy Couch - UK Access User Group" wrote in message
news:74AE0FF9-8012-4AAF-9EDF-567CBBAA13E3@microsoft.com...
> Here is an example of a code snippet, you will need to include the outlook
> refernce library.
>
> The biggest problem with linking e-mails to outlook, are the various
changes
> Microsoft keep making to outlook in service packs, which tends to make the
> whole process more difficult.
>
> The following is fairly basic but should get you started.
>
> Sub Mail_Send(Subject As String, Body As String, ToAddress As String,
> DatabaseFile As String)
> Dim objOL As Outlook.Application
> Dim Trymail As Integer
> Trymail = 0
> RetryMail:
> Trymail = Trymail + 1
> On Error Resume Next
> Set objOL = GetObject(, "Outlook.Application")
> If Err.Number <> 0 Then
> MsgBox "Start Your EMail System The Press OK", vbInformation,
"EMail
> Not Running"
> If Trymail > 5 Then
> MsgBox "Aborting Operation Unable To Start E-Mail"
> Exit Sub
> End If
> GoTo RetryMail
> End If
> On Error GoTo 0
>
> Dim ObjFolder As Outlook.MAPIFolder Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
> Dim objNameSpace As Outlook.NameSpace
> Set objNameSpace = objOL.GetNamespace("MAPI")
> Call objNameSpace.Logon("Microsoft Outlook", "", False, True)
> ' Set ObjFolder = objNameSpace.GetDefaultFolder(olFolderInbox)
> ' ObjFolder.Display
> Set objMail = objOL.CreateItem(olMailItem)
> objMail.Subject = Subject
> objMail.Body = Body
> objMail.To = ToAddress
>
> objMail.Display
>
> Set objOL = Nothing
> End Sub
>
> Hope this helps. | 
07-Nov-2005, 11:25 AM
|  | Guest | | | | | | | | | | Re: Send email from data access form - Subject Problem No I am not saying that you definitely can't set the subject in Href using Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
field information, but you could try setting it via some code if you are Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
having problems with your current approach.
Hope this gives you another avenue to investigate.
"Michael J. Earl" wrote:
> Andy,
>
> Thanks for the reply and code snippet....
>
> But are you saying that I definitely can't set the subject in Href using
> field information
> eg.mailto:dfdfdhdhh@com?Subject=DataAccesssPages!M yDataAccessPage!Hypperlink
> ..text?
>
> Please confirm
>
> Mike
> | 
07-Nov-2005, 11:26 AM
|  | Guest | | | | | | | | | | Re: Send email from data access form - Subject Problem Looks like Href and Standard Hyperlink field settings can only parse
resolved, concatenated strings and one cannot use VB in Data Access Pages. Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
Instead one must use scripting or HTML and I'm totally out of my depth in
both.
I found some HTML code on the Knowledge Base - but I have to admit I don't
know where to start - I don't even know whereabouts in the HTML to insert
it.
So I think I'm stuck.
Put together with some unresolved e-commerce dynamic web site problems with
NetObjects Fusion 8, it's not been the most productive weekend.
But as they:- "If you have been, thanks for listening." Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
Mike
"Andy Couch - UK Access User Group" wrote in message
news:1E8B3B89-7400-4DEF-8C72-46BC3583795E@microsoft.com...
> No I am not saying that you definitely can't set the subject in Href using
> field information, but you could try setting it via some code if you are
> having problems with your current approach.
>
> Hope this gives you another avenue to investigate.
>
> "Michael J. Earl" wrote:
>
> > Andy,
> >
> > Thanks for the reply and code snippet....
> >
> > But are you saying that I definitely can't set the subject in Href using
> > field information
> >
eg.mailto:dfdfdhdhh@com?Subject=DataAccesssPages!M yDataAccessPage!Hypperlink
> > ..text?
> >
> > Please confirm
> >
> > Mike
> >
> | 
07-Nov-2005, 11:26 AM
|  | Guest | | | | | | | | | | Re: Send email from data access form - Subject Problem Yea I probably directed you off in the wrong direction here. The kind of code
that I sent you would work in a standard access form, or work in ASP, or you
could get something similar to work in ASP.NET. I have a number of
applications which use ASP pages and Access databases for sophisticated
e-mailing, but I never use Data Access Pages, and would not recommend them
unless you have a very simple requirement, then they are too restrictive.
I remember seeing a sophisticated presentation on using Data Access pages,
and I kept thinking why bother, when their are much better technologies to
solve these problems.
My advise would be to use either .NET or standard ASP to achive your
functionality (as I presume you want it to work through a browser).
Sorry if I miss-directed you here.
"Michael J. Earl" wrote:
> Looks like Href and Standard Hyperlink field settings can only parse
> resolved, concatenated strings and one cannot use VB in Data Access Pages.
> Instead one must use scripting or HTML and I'm totally out of my depth in
> both.
> I found some HTML code on the Knowledge Base - but I have to admit I don't
> know where to start - I don't even know whereabouts in the HTML to insert
> it.
> So I think I'm stuck.
> Put together with some unresolved e-commerce dynamic web site problems with
> NetObjects Fusion 8, it's not been the most productive weekend.
>
> But as they:- "If you have been, thanks for listening." Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
>
> Mike
>
>
> "Andy Couch - UK Access User Group"
> wrote in message
> news:1E8B3B89-7400-4DEF-8C72-46BC3583795E@microsoft.com...
> > No I am not saying that you definitely can't set the subject in Href using
> > field information, but you could try setting it via some code if you are
> > having problems with your current approach.
> >
> > Hope this gives you another avenue to investigate.
> >
> > "Michael J. Earl" wrote:
> >
> > > Andy,
> > >
> > > Thanks for the reply and code snippet....
> > >
> > > But are you saying that I definitely can't set the subject in Href using
> > > field information
> > >
> eg.mailto:dfdfdhdhh@com?Subject=DataAccesssPages!M yDataAccessPage!Hypperlink Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=6778
> > > ..text?
> > >
> > > Please confirm
> > >
> > > Mike
> > >
> >
>
>
> | 
Support Us! Become a Promoter! | | Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh! | (View-All)
Members who have read this thread : 0
| | There are no names to display. | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Tools | Search | | | | | Display Modes | Linear Mode |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is On | | | | » Active Discussions | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | » Books You Should Read... | | | |