Create a link between Excel and Gmail.

Cassandra -  
cs_Le Pivert Posted messages 8437 Status Contributor -
Hello,

I need help, and I hope someone can come to my aid quickly.
I have to create a connection between Excel and the company’s messaging system. In fact, I have a project to complete, and I need to find out how to generate an automatic email when one of the Excel cells displays that the manufacturing in the workshop is finished.

I've been looking for a solution, and I wonder if it's even possible to achieve this. Even with the hyperlink, I can't get it to work.

1 answer

  1. cs_Le Pivert Posted messages 8437 Status Contributor 730
     
    Hello,

    In VBA, here are 2 methods to open a messaging application:

    'Livemail Sub launch() Dim appl appl = Shell("C:\Program Files (x86)\Windows Live\Mail\wlmail.exe", vbNormalFocus) 'adapt the application path End Sub 'outlook Sub open() Dim myOlApp, myItem, olMailItem Set myOlApp = CreateObject("Outlook.Application") Set myItem = myOlApp.CreateItem(olMailItem) myItem.Display End Sub 


    --
    @+ The Woodpecker
    0
    1. Cassandra
       
      Thank you for getting back to me so quickly.
      However, I am new to using macros... Do I just need to copy and paste your response? Because the software indicates that the following features cannot be saved in workbooks without macros...
      0
    2. cs_Le Pivert Posted messages 8437 Status Contributor 730
       
      Read this to enable macros. Then save your workbook by checking in the dropdown menu for saving that accepts macros.
      Then open your workbook and it's operational.

      https://support.microsoft.com/en-us/office/enable-or-disable-macros-in-office-files-12b036fd-d140-4e74-b45e-16fed1a7e5c6?redirectsourcepath=%252ffr-fr%252farticle%252factiver-ou-d%2525c3%2525a9sactiver-les-macros-dans-les-documents-office-7b4fdd2e-174f-47e2-9611-9efe4f860b12&ui=en-us&rs=en-us&ad=us

      To access the editor, press Alt F11, then in the ribbon:
      Insert, UserForm
      View, Toolbox, add a CommandButton
      Double click on this CommandButton and put in the module that appears:

      Option Explicit Private Sub CommandButton1_Click() launch 'or open as you choose End Sub 'Livemail Sub launch() Dim appl appl = Shell("C:\Program Files (x86)\Windows Live\Mail\wlmail.exe", vbNormalFocus) 'adapt the application path End Sub 'outlook Sub open() Dim myOlApp, myItem, olMailItem Set myOlApp = CreateObject("Outlook.Application") Set myItem = myOlApp.CreateItem(olMailItem) myItem.Display End Sub 


      then press F5

      There you go.
      0
    3. eriiic Posted messages 24581 Registration date   Status Contributor Last intervention   7 281
       
      Hello,

      and save as .xlsm
      eric
      0
    4. Cassandra
       
      I have completed all the steps, but once I press F5, it shows: "compilation error Ambiguous name detected: CommandButton1_Click" ....
      What should I do?
      0
    5. Cassandra
       
      Well actually, now it shows me "file not found" "runtime error" I have the choice between "end" or "unlock" ........
      0