Macro Question

chrysti

Board Regular
Joined
Dec 20, 2006
Messages
215
I have heard that there is a way to get a Macro to text a cell phone when it is done running??? Is this possible, and does anyone know the code that would allow me to do this???

Thanks in advance!!! This would be a lifesaver!!!

Chrysti :LOL: :LOL: :LOL:
 

Some videos you may like

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
Chrysti

I've never heard of such a thing in Excel VBA.:eek:

Sounds to me that's it's more likely to be something using Windows API and/or the web.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,218
Office Version
  1. 365
Platform
  1. Windows
Chrysti

That's not too hard and if you search the board there are plenty of examples.

The 'easiest' way would be to use the SendMail method but that has various restrictions. eg you can't specify the body of the email

Other methods involve automating your email client eg Outlook, again a search will find plenty of examples.
 

chrysti

Board Regular
Joined
Dec 20, 2006
Messages
215
I have been trying to get this code to work:
Sub Mail_Small_Text_CDO()
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String
' Dim Flds As Variant

Set iMsg = CreateObject("CDO.Message")
Set iConf = CreateObject("CDO.Configuration")

iConf.Load -1 ' CDO Source Defaults
Set Flds = iConf.Fields
With Flds
.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "111.111.111.111" 'Need your STMP address here
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
.Update
End With

strbody = "Hey There," & vbNewLine & vbNewLine & _
"Test 1" & vbNewLine & _
"Test 2" & vbNewLine & _
"Test 3" & vbNewLine & _
"Test 4"

With iMsg
Set .Configuration = iConf
.To = "Test@Test.com"
.CC = ""
.BCC = ""
.From = """TestUser"" <TestUser@test.com>"
.Subject = "Important message"
.TextBody = strbody
.Send
End With

Set iMsg = Nothing
Set iConf = Nothing
End Sub

But when I get to
.Send
I get an error

I have tried other code, but then I get an error box about if I want to continue sending, and I CAN'T install anything to get around this, is there something else that I can do to answer this box YES???
 

Watch MrExcel Video

Forum statistics

Threads
1,122,552
Messages
5,596,801
Members
414,103
Latest member
imamalidadashzada

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top