Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default SendKeys command not focusing on the correct open program

Friends,

I am using the following programming in a macro. Working with MS
outlook the SendKeys "%s", True" found at the bottom of the "code" will
send the email. However, I want to use Eudora Pro rather than Outlook
and I want to save the e-mails rather then send them. To save these
"personalized" e-mails, I need to use Sendkeys "^s". The problem, this
is the same Sendkeys command that is used to save the current open
Excel spreadsheet . . . not what I want to do.

How can I focus control on the open Eudora software when attempting to
save the e-mail, then move control back again to Excel after the e-mail
save has taken place?

I have used the Sendkeysto command in WinBatch to select the open
software in which the command will take place, but do not see this
command in VB.

For Each cell In
Columns("e").Cells.SpecialCells(xlCellTypeConstant s)
If cell.Value Like "*@*" Then
Recipient = cell.Value
Subj = "Funds Sent Today"
Msg = "Dear " & cell.Offset(0, -4).Value & "%0A"
Msg = Msg & "%0A" & "This is just a quick e-mail to let you
know that today the following amount was sent to your bank account: " &
"%0A"
Msg = Msg & "%0A"
Msg = Msg & "$" & cell.Offset(0, -3).Value & "%0A"
Msg = Msg & "%0A" & "Bookkeeper"
HLink = "mailto:" & Recipient & "?"
HLink = HLink & "subject=" & Subj & "&"
HLink = HLink & "body=" & Msg
ActiveWorkbook.FollowHyperlink (HLink)
Application.Wait (Now + TimeValue("0:00:3"))
SendKeys "%s", True
End If
Next


Is there a way to change add lines around the SendKeys line??

(this line would focus control on the Eudora software)
SendKeys "%s", True
(this line would focus control back on the open Excel software)

Thanks,
Mike


---
Message posted from http://www.ExcelForum.com/

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem sending the command to the program Robert Excel Discussion (Misc queries) 0 December 22nd 09 01:33 AM
Vlookup command not giving the correct result VKL Narayanan[_2_] Excel Worksheet Functions 2 November 1st 08 11:48 AM
How to find the correct program to download an .xls attachment sportshistorybuff Excel Discussion (Misc queries) 2 June 30th 06 04:49 PM
Correct syntax for use Replace command via DDE? Bjørn Holm Excel Programming 4 November 27th 03 01:07 PM
Open Filename + SendKeys Matthew[_6_] Excel Programming 5 July 31st 03 04:12 PM


All times are GMT +1. The time now is 12:33 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"