שמירת שאילתא באקסס
תכנות
42
פוסטים
4
כותבים
1.1k
צפיות
3
עוקבים
-
טעות שלי, זה מודול של טופס ולכן א"א למחוק אותו.
פשוט תמחק את כל התוכן שלו, ותעשה העתק הדבק לתוכן שיש בקובץ ששלחתי. -
תחליף את הפונקציה האחרונה במודול שלך (Send) לזה:
Public Function Send(strBodyText) as string 'on error goto SendErr Dim cdoConfig Dim msgOne Dim ErrStr Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 465 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "YourEmail@gmail.com" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "YourPasswoed" .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Update End With Set msgOne = CreateObject("CDO.Message") Set msgOne.Configuration = cdoConfig msgOne.To = "To name <SendTo@gmail.com>" msgOne.From = "Your Name <YourEmail@gmail.com>" msgOne.Subject = "בוצע חיפוש" msgOne.TextBody = strBodyText msgOne.Send send = "השליחה בוצעה בהצלחה" exit function SendErr: send = "התרחשה שגיאה במהלך שליחת המייל" End Function
-
תחליף את הפונקציה האחרונה במודול שלך (Send) לזה:
Public Function Send(strBodyText) as string 'on error goto SendErr Dim cdoConfig Dim msgOne Dim ErrStr Set cdoConfig = CreateObject("CDO.Configuration") With cdoConfig.Fields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = 465 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com" .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "YourEmail@gmail.com" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "YourPasswoed" .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1 .Update End With Set msgOne = CreateObject("CDO.Message") Set msgOne.Configuration = cdoConfig msgOne.To = "To name <SendTo@gmail.com>" msgOne.From = "Your Name <YourEmail@gmail.com>" msgOne.Subject = "בוצע חיפוש" msgOne.TextBody = strBodyText msgOne.Send send = "השליחה בוצעה בהצלחה" exit function SendErr: send = "התרחשה שגיאה במהלך שליחת המייל" End Function