Code for Replying to Selected Msg 
Author Message
 Code for Replying to Selected Msg

I'm trying to setup some outlook macros for my department to reduce work on
repeative tasks.  I'm a bit of a newbie at outlook objects, but I've managed
to code just about everything I want my macro to do except for the most
basic thing.  I can't figure out how to reply to the currently selected
message!!  I know this seems like a basic thing, but I think I'm messing up
my objects.  So, HELP!  thanks.


Thu, 14 Jul 2005 06:37:15 GMT  
 Code for Replying to Selected Msg

Quote:

> I'm trying to setup some outlook macros for my department to reduce work on
> repeative tasks.  I'm a bit of a newbie at outlook objects, but I've managed
> to code just about everything I want my macro to do except for the most
> basic thing.  I can't figure out how to reply to the currently selected
> message!!  I know this seems like a basic thing, but I think I'm messing up
> my objects.  So, HELP!  thanks.

Here you go...

Sub replying()
    Dim myitem, myreply
    Set myitem = Application.ActiveExplorer.Selection(1)
    Set myreply = myitem.Reply
    'for sending the reply
    myreply.Send
End Sub

Regards
Natarajan



Fri, 15 Jul 2005 16:02:25 GMT  
 Code for Replying to Selected Msg
Sweet, thanks.  Actually I was really close, I didn't know about the (1)
about .selection.  You know why that is there?  Help never mentioned
anything about it.

I try to insert the text from the previous email in the reply (so it looks
like a normal reply) but it only manages to copy straight text, no HTML.
Anyway to fix this?  I use:

    objreply.HTMLBody = "Text Here" & Chr(13) & Chr(13) & objitem.HTMLBody

...but it still doesn't pick up the HTML.  Am I doing something wrong?

One last thing, how do I insert the signature using VB?  Again, help doesn't
mention a thing about it, but there must be a way.  Thanks for all your
help.

HockeyBoy



Quote:
> > I'm trying to setup some outlook macros for my department to reduce work
on
> > repeative tasks.  I'm a bit of a newbie at outlook objects, but I've
managed
> > to code just about everything I want my macro to do except for the most
> > basic thing.  I can't figure out how to reply to the currently selected
> > message!!  I know this seems like a basic thing, but I think I'm messing
up
> > my objects.  So, HELP!  thanks.

> Here you go...

> Sub replying()
>     Dim myitem, myreply
>     Set myitem = Application.ActiveExplorer.Selection(1)
>     Set myreply = myitem.Reply
>     'for sending the reply
>     myreply.Send
> End Sub

> Regards
> Natarajan



Thu, 21 Jul 2005 03:55:04 GMT  
 Code for Replying to Selected Msg
Hello, HockeyBoy!
You wrote  on Sat, 01 Feb 2003 19:55:04 GMT:

 H>
 H> I try to insert the text from the previous email in the reply (so it

look at http://dyakovkm.tripod.com/en/office/rgxp.htm




Fri, 22 Jul 2005 21:51:35 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Code for Replying to Selected Msg

2. Preventing Reply or Changing Reply Address

3. Setting the selected option of a select box in code

4. Code to set Chart Y Axis value - Reply to SteveT

5. Need code to convert PlainText to RichText/HTML format when replying

6. Setting reply address via code

7. HOW TO in VB :Outlook MSG DROP in Explorer creates a MSG File

8. VBA code to save email messages (.msg) to hard drive

9. Access a .msg file with code

10. i input code from office xp Inside Out and get error msg

11. Looking for a Gradient OCX or code THAT DOES NOT GIVE AN ILLEGAL ACTION MSG

12. VBA Code for Selecting Header and Updating Fields Codes

 

 
Powered by phpBB® Forum Software