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

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

قام بنشر

السلام عليكم

لدي ملف اكسيل فورم ل ارساله سائل نصية الكود يعمل بشكل صحيح ولكن لا يتم لص نص الرساله

ارجو المساعدة 

Private Sub CommandButton1_Click()
    Dim contact As String
    Dim text As String

    '
    contact = TextBox1.Value
    text = TextBox2.Value

    '  Google Messages
    ActiveWorkbook.FollowHyperlink Address:="https://messages.google.com"
    Application.Wait (Now + TimeValue("00:00:10"))

    '
    Call SendKeys("{TAB}", True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys("{TAB}", True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys("~", True) ' Enter key
    Application.Wait (Now + TimeValue("00:00:04"))
    
    '
    Call SendKeys(contact, True)
    Application.Wait (Now + TimeValue("00:00:04"))
    
    '
    Call SendKeys("{TAB}", True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys(text, True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys("~", True) ' Enter key
    Application.Wait (Now + TimeValue("00:00:04"))
End Sub

 

sms.xlsm

  • تمت الإجابة
قام بنشر

جرب هذا الكود المختصر بإذن الله يكون هو المطلوب

Private Sub CommandButton1_Click()
    Dim contact As String, mytext As String

    contact = TextBox1.Value
    mytext = TextBox2.Value

    '  Google Messages
    ActiveWorkbook.FollowHyperlink Address:="https://messages.google.com/web/conversations/new"
    Application.Wait (Now + TimeValue("00:00:10"))

    Call SendKeys(contact, True)
    Application.Wait (Now + TimeValue("00:00:04"))
    Call SendKeys("{TAB}", True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys("~", True) ' Enter key
    Application.Wait (Now + TimeValue("00:00:04"))
    
    Call SendKeys(mytext, True)
    Application.Wait (Now + TimeValue("00:00:01"))
    Call SendKeys("~", True) ' Enter key
    Application.Wait (Now + TimeValue("00:00:04"))
    
    MsgBox "Done by mr-mas.com"
End Sub

بالتوفيق

  • Like 3

انشئ حساب جديد او قم بتسجيل دخولك لتتمكن من اضافه تعليق جديد

يجب ان تكون عضوا لدينا لتتمكن من التعليق

انشئ حساب جديد

سجل حسابك الجديد لدينا في الموقع بمنتهي السهوله .

سجل حساب جديد

تسجيل دخول

هل تمتلك حساب بالفعل ؟ سجل دخولك من هنا.

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

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

Important Information