Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I used these two "scripts" in Offic Xp and works perfectly. Now I am using Office 2003 and these scripts dosnt work, so can you help me? First: If outlook dosnt run then run outlook (it allways opens) On Error Resume Next WhichProgram = GetObject(, "Outlook.Application") If Err.Number < 0 Then IsItRunning = True Err.Clear If IsItRunning = True Then Dim RetVal RetVal = Shell("C:\Program Files\Microsoft Office\Office11\Outlook.EXE", 6) End If Second: Send email from excel (Outlook just flash but nothing happens) Dim objEnv As MsoEnvelope ActiveSheet.Range("A1", "D30").Select ThisWorkbook.EnvelopeVisible = True Set objEnv = List1.MailEnvelope With objEnv .Item.To = " .Item.Subject = "Test" .Item.Send End With Thank you Tom |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use
CreateObject "Outlook.Application" instead of the Shell command. Not sure if your install made into the same path, which might be the cause of your problems. -- Regards Juan Pablo González "TOM" wrote in message ... Hello, I used these two "scripts" in Offic Xp and works perfectly. Now I am using Office 2003 and these scripts dosnt work, so can you help me? First: If outlook dosnt run then run outlook (it allways opens) On Error Resume Next WhichProgram = GetObject(, "Outlook.Application") If Err.Number < 0 Then IsItRunning = True Err.Clear If IsItRunning = True Then Dim RetVal RetVal = Shell("C:\Program Files\Microsoft Office\Office11\Outlook.EXE", 6) End If Second: Send email from excel (Outlook just flash but nothing happens) Dim objEnv As MsoEnvelope ActiveSheet.Range("A1", "D30").Select ThisWorkbook.EnvelopeVisible = True Set objEnv = List1.MailEnvelope With objEnv .Item.To = " .Item.Subject = "Test" .Item.Send End With Thank you Tom |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 versus Excel 2003 & Excel 97-2003 fully compatible | Excel Worksheet Functions | |||
Convert Excel 2003 spreadsheet into Outlook Contacts table 2003 | Excel Discussion (Misc queries) | |||
import Excel 2003 file into Outlook 2003 - NO NAMED RANGES?? | Excel Discussion (Misc queries) | |||
Copying Excel 2003 Selection into Outlook 2003 HTML E-Mail Message | Excel Discussion (Misc queries) | |||
Excel 2003 Database Driver Visual FoxPro 7 on Server 2003. | Excel Discussion (Misc queries) |