اذهب الي المحتوي
أوفيسنا

لمن يريدون أن يرسلوا Email من الأكسس


Daniello

الردود الموصى بها

السلام عليكم جميعا

يمكنكم أن تستنجوا من هذا البرنامج طريقة إرسال رسائلكم انطلاقا من الأكسس

أتمنى أن ينال إعجابكم فقد جربته وأعجبني

أنا في انتظار ردودكم

حملوه من هنا

  • Thanks 1
رابط هذا التعليق
شارك

  • 2 months later...

هذا الكود من احدى المنتديات الأجنبيه هنـــــــــــــــا

حيث يقوم بإرسال الإيميل من خلال الـــ outlook

Dim objOutlook As Outlook.Application
Dim objOutlookMsg As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Dim objOutlookAttach As Outlook.Attachment
Dim email As String

 'Output Report As RTF
DoCmd.OutputTo acOutputReport, "report", acFormatRTF, "c:\Report.RTF"

email = Me.List0
    ' Create the Outlook session.
   Set objOutlook = CreateObject("Outlook.Application")

   ' Create the message.
   Set objOutlookMsg = objOutlook.CreateItem(olMailItem)

   With objOutlookMsg
      ' Add the To recipient(s) to the message.
     Set objOutlookRecip = .Recipients.add(email)
     objOutlookRecip.Type = olTo

      ' Add the CC recipient(s) to the message.
      Set objOutlookRecip = .Recipients.add("myownEmailaddress")
      objOutlookRecip.Type = olCC

      ' Set the Subject, Body, and Importance of the message.
      .Subject = "Order From Allandale Sports"
      .Body = "Your Order Has Arrived Please Come and collect it from US " & vbCrLf & vbCrLf
      .Importance = olImportanceHigh  'High importance

       'Add attachments to the message.
     'If Not IsMissing(AttachmentPath) Then
         Set objOutlookAttach = .Attachments.add("c:\Report.RTF")
        ' End If

      ' Resolve each Recipient's name.
      For Each objOutlookRecip In .Recipients
         objOutlookRecip.Resolve
         If Not objOutlookRecip.Resolve Then
         objOutlookMsg.display
      End If
      Next
      .Send

   End With
   Set objOutlookMsg = Nothing
   Set objOutlook = Nothing


DoCmd.OpenQuery "UPDATEARCHIVE"
DoCmd.OpenQuery "ORDERCOMDETORDEDETAILS"
DoCmd.OpenQuery "OrderCompleteOrderDEL"
MsgBox "The Order Has been completed and the client emailed"
DoCmd.Close acForm, "frmORDERCOMPLETETOCUST"
DoCmd.Close
DoCmd.OpenForm "Welcome Form"

End If
emailerror:

MsgBox "There was a problem with outlook"

رابط هذا التعليق
شارك

الدالة التالية تقوم بإرسال بريد إليكتروني بواسطة أوت لوك مع ملف مرفق من خلال الأكسس وهي وهي من عمل الأخ الكريم أبو هاجر جزاه الله خيرا

Function sendmail()

Set objOutl = CreateObject("Outlook.Application")



Set objMailItem = objOutl.CreateItem(olMailItem)



'Const olMailItem = 0 ' Constants for new items

Const olAppointmentItem = 1

Const olContactItem = 2

Const olTaskItem = 3

Const olJournalItem = 4

Const olNoteItem = 5

Const olPostItem = 6



objMailItem.Recipients.Add "SunnyB@xyz.com        ' 1st E-mail address"

objMailItem.Recipients.Add "BGate@Microsoft.com" ' 2nd recipient

objMailItem.Display

objMailItem.Attachments.Add "c:mydirs.txt"



objMailItem.Subject = "My birthday party" ' subject

objMailItem.Body = "Hi, like to invite you all to my ..." ' the message



Set objNameSpace = objOutl.GetNamespace("MAPI")



' now we are ready to "logon" to outlook (using Logon method)

objNameSpace.Logon "profile", "password"

objMailItem.Send                                    ' send method

objNameSpace.Logoff                                 ' logoff



End Function

رابط هذا التعليق
شارك

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information