
Code for Replying to Selected Msg
Quote:
> 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.
Selection is a collection. If you want just one item, you can specify the index number. If you want multiple items, you loop through the collection with a For Each ... Next loop.
Quote:
> 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?
If you have Outlook set to include the original message text in the reply, it should already be there, even when you generate the reply with the Reply method.
Quote:
> 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?
Remember this is HTML! What you add needs to use HTML tags, not normal string techniques. Also, you need to insert into the <body> element; you can't just append text to an HTML documents. I don't have a good code sample to demonstrate this, but will see about putting one together.
Quote:
> 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.
Forget about "there must be a way" when it comes to Outlook, unless you're willing to work hard to develop workarounds. See the thread on "VBA code to insert signature on e-mail" in this group starting 1/17.
Quote:
> Try this:
> Set objOL = CreateObject("Outlook.Application")
> Set objExp = objOL.ActiveExplorer
> Set objItem = objExp.Selection(1)
> Set objReply = objItem.Reply
> > 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
> manage
> > 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!!