تقييم الموضوع :
  • 0 أصوات - بمعدل 0
  • 1
  • 2
  • 3
  • 4
  • 5
ارسال بريد اليكترونى بتنسيق جدول
#1
السادة الزملاء الافاضل

السلام عليكم ورحمة الله وبركاته .

قمت بعمل برنامج للشركة التى أعمل بها و هو يعمل جيداً و لله الحمد، ويقوم البرنامج بارسال ايميل عند تغيير البيانات او عند الموافقه على طلب ما من الرئيس المسئول كما فى الكود التالى

كود :
With Contacts
           .Data1.RecordSource = " select * from Contacts where UnitNames like '" & TdepartmentNameDB.Text & "*" & "'"
           .Data1.Refresh
                       TDepartment.Text = .DBGrid1.Columns(1).Text
                       TUnitNames.Text = .DBGrid1.Columns(2).Text
                       TIssuedName.Text = .DBGrid1.Columns(3).Text
                       TIssuedEmail.Text = .DBGrid1.Columns(4).Text
                       TDelegationTo.Text = .DBGrid1.Columns(11).Text
                       TAdministration.Text = .DBGrid1.Columns(24).Text
                       TDelegationToName.Text = .DBGrid1.Columns(11).Text
                       IssuedDelegationName.Text = .DBGrid1.Columns(5).Text
                       IssuedDelegationEmail.Text = .DBGrid1.Columns(6).Text
                       MechanicalSection.Text = .DBGrid1.Columns(13).Text
                       ElectricalSection.Text = .DBGrid1.Columns(14).Text
                       WeldingSection.Text = .DBGrid1.Columns(15).Text
                       VehiclesSection.Text = .DBGrid1.Columns(16).Text
                           PM2Names.Text = .DBGrid1.Columns(25).Text
                       ProdPM2.Text = .DBGrid1.Columns(26).Text
                           PM3Names.Text = .DBGrid1.Columns(27).Text
                       ProdPM3.Text = .DBGrid1.Columns(28).Text
                           PM4Names.Text = .DBGrid1.Columns(29).Text
                       ProdPM4.Text = .DBGrid1.Columns(30).Text
                           DeInkingName.Text = .DBGrid1.Columns(31).Text
                       ProdDeInking.Text = .DBGrid1.Columns(32).Text
                           GeneralName.Text = .DBGrid1.Columns(33).Text
                       ProdGeneral.Text = .DBGrid1.Columns(34).Text
End With
Text24.Text = ""
On Error Resume Next
Dim linecount As Long
If TDepartment.Text = "Production" Then
           If TLine = "PM2" Or TLine.Text = "Winder2A" Or TLine.Text = "Winder2B" Then
                   Text24.Text = " Dear Mr. " & PM2Names.Text & " " & " ,   " & "  " & IssuedDelegationName.Text & ""
               End If
                   If TLine.Text = "PM3" Or TLine.Text = "Winder3" Then
                           Text24.Text = " Dear Mr. " & PM3Names.Text & " " & " ,   " & "  " & IssuedDelegationName.Text & ""
                       End If
                                           If TLine.Text = "General" Or TLine.Text = "C-PM2/PM3/PM4" Then
                                                   Text24.Text = " Dear Mr. " & GeneralName.Text & " " & " ,   " & "  " & IssuedDelegationName.Text & ""
                                               End If
       Text24.Text = " " & Text24.Text & vbNewLine & ""
       Text24.Text = " " & Text24.Text & vbNewLine & "               " & "Kindly Below is RRS Issued By Your Department, And Maintenance Department Receive it, By :  " & Text19.Text & " , And Now Task In Planning "
       Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "RRS #   " & TRRS.Text & "  " '    With Status :    " & TMaintenanceSatus.Text & " "
       Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Description :       " & TActionTaken.Text & ""
       Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Maintenance Section  :    " & Combo8.Text & "       -    " & "  Shift   :   " & Combo1.Text & "  "
       Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Receive Time  :    " & MB2.Text & " "  '      -    " & "  Shift   :   " & TShift.Text & "  "
       Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Receive Comment  :    " & Text6.Text & "       -    " & "  and It's Issue Task # :   " & Text21.Text & "   - @    " & MB2.Text & ""
       Text24.Text = " " & Text24.Text & vbNewLine & ""
       Text24.Text = " " & Text24.Text & vbNewLine & " This Message Was Sent Automatically by Maintenance System Programs, Don't Reply This Message"
       Text24.Text = " " & Text24.Text & vbNewLine & ""
       Text24.Text = " " & Text24.Text & vbNewLine & "Powered By Maintenance System Program"
       Text24.Text = " " & Text24.Text & vbNewLine & " ------------------------------------------------------- "
Else

           Text24.Text = " Dear Mr. " & TIssuedName.Text & " " & " ,   " & "  " & IssuedDelegationName.Text & ""
           Text24.Text = " " & Text24.Text & vbNewLine & ""
           Text24.Text = " " & Text24.Text & vbNewLine & "               " & "Kindly Below is RRS Issued By Your Department, And Maintenance Department Receive it, By :  " & Text19.Text & " , And Now Task In Planning "
           Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "RRS #   " & TRRS.Text & "  " '    With Status :    " & TMaintenanceSatus.Text & " "
           Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Description :       " & TActionTaken.Text & ""
           Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Maintenance Section  :    " & Combo8.Text & "       -    " & "  Shift   :   " & Combo1.Text & "  "
           Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Receive Time  :    " & MB2.Text & " "  '      -    " & "  Shift   :   " & TShift.Text & "  "
           Text24.Text = " " & Text24.Text & vbNewLine & "                           -      " & "Receive Comment  :    " & Text6.Text & "       -    " & "  and It's Issue Task # :   " & Text21.Text & "   @    " & MB2.Text & ""
           Text24.Text = " " & Text24.Text & vbNewLine & ""
           Text24.Text = " " & Text24.Text & vbNewLine & " This Message Was Sent Automatically by Maintenance System Programs, Don't Reply This Message"
           Text24.Text = " " & Text24.Text & vbNewLine & ""
           Text24.Text = " " & Text24.Text & vbNewLine & "Powered By Maintenance System Program"
           Text24.Text = " " & Text24.Text & vbNewLine & " ------------------------------------------------------- "
End If
           Dim objOutlook As Object
           Dim objOutlookMsg As Object
           Set objOutlook = CreateObject("Outlook.Application")
           Set objOutlookMsg = objOutlook.CreateItem(0)
           With objOutlookMsg
If TDepartment.Text = "Production" Then
                   If TLine.Text = "PM2" Or TLine.Text = "Winder2A" Or TLine.Text = "Winder2B" Then
                          .To = ProdPM2.Text
                   End If
                   If TLine.Text = "PM3" Or TLine.Text = "Winder3" Then
                          .To = ProdPM3.Text
                   End If
                   If TLine.Text = "General" Or TLine.Text = "C-PM2/PM3/PM4" Then
                          .To = GeneralName.Text
                   End If
   If Combo8.Text = "Mechanical" Then
               .Cc = MechanicalSection.Text
       End If
   If Combo8.Text = "Electrical" Then
               .Cc = ElectricalSection.Text
       End If
   If Combo8.Text = "Welding" Then
               .Cc = WeldingSection.Text
       End If
   If Combo8.Text = "Vehicles" Then
               .Cc = VehiclesSection.Text
           End If
               .Subject = " RRS #   " & TRRS.Text & "   Now Receive By    " & Text19.Text & "  -  and It's Issue Task # :  " & Text21.Text & "   - @    " & MB2.Text & " "
               .Body = Text24.Text
               .Send  'Let´s go!
               Set objOutlookMsg = Nothing
               Set objOutlook = Nothing
Else
               .To = TIssuedEmail.Text
   If TSection.Text = "Mechanical" Then
               .Cc = MechanicalSection.Text
       End If
   If TSection.Text = "Electrical" Then
               .Cc = ElectricalSection.Text
       End If
   If TSection.Text = "Welding" Then
               .Cc = WeldingSection.Text
       End If
   If TSection.Text = "Vehicles" Then
               .Cc = VehiclesSection.Text
           End If
               .Subject = " RRS #   " & TRRS.Text & "   Now Receive By    " & Text19.Text & "  -  and It's Issue Task # :  " & Text21.Text & "   - @    " & MB2.Text & " "
               .Body = Text24.Text
               .Send  'Let´s go!
               Set objOutlookMsg = Nothing
               Set objOutlook = Nothing
End If
           End With
           Exit Sub
End Sub  
thanks a lot

ولكن طلب منى مديرى ارسال هذا اليميل بتنسيق مثل الجدول كما فى الصورة المرفقة ؟

ولكن بحثت كثيراً على جوجل و كثير من المواقع ولكن لم أجد ضالتى بها. فهل اجد أحد منكم يساعدنى او يقوم بالتعديل بالكود السابق الذكر.
بارك الله فيكم وفى الجميع.
   
لا اله الا انت سبحانك انى كنت من الظالمين.
اللهم انك عفو كريم حليم تحب العفو فاعفوا عنا.
اللّهُمَّ اغْفِرْ لِي وَلِوالِدَيَّ وَارْحَمْهُما كَما رَبَّيانِي صَغِيراً، اللَّهُمَّ اجْزِهِما بِالاِحْسانِ إِحْسانا وَبِالسَّيِّئاتِ غُفْرانا، اللَّهُمَّ اغْفِرْ لِلْمُؤْمِنينَ وَالمُؤْمِناتِ الاَحْياءِ مِنْهُمْ وَالاَمْواتِ.
سبحان الله والحمدلله ولا إله إلا الله والله أكبر زنه عرشك ومداد كلماتك ورضاء نفسك وكما ينبغى لجلال شأنك وعظيم سلطانك وعدد ما كان وعدد ما سيكون وعدد الحركات و السكون وعدد ما نعلم وعدد مالانعلم وعدد كل شيئ احصيته بعلمك يا كريم
الرد }}}
تم الشكر بواسطة:


الردود في هذا الموضوع
ارسال بريد اليكترونى بتنسيق جدول - بواسطة Ashraf Elafify - 03-05-15, 12:50 PM

المواضيع المحتمل أن تكون متشابهة .
الموضوع : الكاتب الردود : المشاهدات : آخر رد
  برنامج جدول الضرب kader30 4 5,353 29-04-20, 03:04 AM
آخر رد: سعود
  [vb6.0] هل يمكن ارسال بريد اليكترونى من برنامجى؟ ahmed_egypt 0 2,175 04-07-16, 12:35 AM
آخر رد: ahmed_egypt
  مساعدة : كود لتصفير حقل في جدول محمد2015 5 3,071 16-05-15, 01:45 AM
آخر رد: Ahmed_Mansoor
  [vb6.0] كرستال ريبورت .. كيف ارسال بالايميل pcfbs 0 2,158 14-05-15, 09:57 PM
آخر رد: pcfbs
  [سؤال] ارسال رسالة إلى جهاز متصل على نفس الشبكة . Hell Cell 0 2,545 18-02-15, 01:55 AM
آخر رد: Hell Cell
  أرجو الرد سريعا في نسخ بيانات من جدول الي اخر superwoofer 3 2,873 16-11-14, 07:52 PM
آخر رد: superwoofer
  كود ارسال e-mail ahmed3d 2 2,830 21-08-13, 09:07 PM
آخر رد: ahmed3d
  مرحبا؟اريد كود تصوير الفورم ووضع الصورة في اداة مربع النص واظهار حوار لحفظ الصورة بتنسيق bmp وشكرا طارق 2 3,585 13-08-13, 04:32 AM
آخر رد: VB_Coder
  ارسال رسالة قصيرة من الجهاز الى الجوال سليم العربى 1 2,712 03-07-13, 08:22 PM
آخر رد: علوش
  طريقة صنع برنامج ارسال صورة او ملفات الى الخادم alsindbada 0 2,027 28-06-13, 09:38 PM
آخر رد: alsindbada

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم