Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macros In VBA

Status
Not open for further replies.

chevyimpala

Programmer
Dec 19, 2003
37
US
This is what I am trying to do:

I have a macro that copys data from the excel sheet then opens a series of emails then stops. Now what I want it to do is copy the data, open the outlook applications, and paste what I just opeied inside each one. Then have it set r1,a1 as the active cell. I tried but I just keep getting errors. Can anyone help me with this. This is what my code looks like now:

Range("A1:I19").Select
Selection.Copy
Range("D22").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("D23").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True

THX.
 
Couple of things;

First, spell check your questions. It helps people's perception of you.

Second, indicate where you are getting the errors, the nature of the errors, etc.

Third, it looks as though the code snippet you put in your request is from a recorded macro. Is this the case?

Fourth, are you competent to use break points, watches and other debugging tools in VBA? If not, I would take a few moments to learn what a break point is, how to step through code and watch variables.

Answers to the second item above will help provide the fix. Pondering 1 and 4 will assist in getting answers to your questions from either yourself or others. #3 may be irrelevant, but I am curious.



~wmichael

"small change can often be found under seat cushions"
 
Let me make it simple. Can you paste copied cells in a outlook email window automatically using a macro!

##And yes it is a recorded Macro##
 
wmichael,

Review your first item with your last post in the ethics forum...

:)



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Hmmm...

If you are recording it, then NO. The scope of the macro is only within the application you are recording it in. You would have to make another macro in Outlook pulls information from the clipboard and places it into an email. This can likely be recorded as well.

Timing that would be difficult, though, unless you batched stuff up and first filled your clipboard, then pulled the indexed items into the appropriate emails.

Think this is gonna work?

~wmichael

"small change can often be found under seat cushions"
 
Blue,

The ethics forum, or perhaps a FAQ on this site is where I first got the idea that it is constructive to let folks know that spelling and other niceties count.



~wmichael

"small change can often be found under seat cushions"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top