Consulting

Results 1 to 3 of 3

Thread: Forward emai macrol button

  1. #1
    VBAX Newbie
    Joined
    Apr 2015
    Posts
    1
    Location

    Forward emai macrol button

    Hello to all I am new in this forum and new into VBA for Outlook 2010.

    I have already done a macro and I am quite happy with it.

    Now I need another one but seems I am not able to find a good solution.

    What I need is a macro that will be linked to a button and when pressed, will forward the current opened message to an email, which can be defined into the code.

    Hope you can help me guys!

  2. #2
    I think something went missing in the translation from your native language.

    You don't need a macro to forward a message. That facility is built into Outlook. Also built in are rules whereby you can automatically forward messages as they arrive. What will the macro add to this?
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    VBAX Mentor skatonni's Avatar
    Joined
    Jun 2006
    Posts
    347
    Location
    Quote Originally Posted by wadio View Post
    forward the current opened message to an email, which can be defined into the code.
    Try this.

    Sub speedForward()
    Dim currentItem As Object
    Dim newForward As Object
    Set currentItem = ActiveInspector.currentItem
    Set newForward = currentItem.Forward
    'currentItem.Close (olDiscard)
    newForward.Recipients.Add "someone AT somewhere DOT com"
    newForward.Recipients.ResolveAll
    newForward.Send
    ExitRoutine:
        Set currentItem = Nothing
        Set newForward = Nothing
    End Sub
    To debug, mouse-click anywhere in the code. Press F8 repeatedly to step through the code. http://www.cpearson.com/excel/DebuggingVBA.aspx

    If your problem has been solved in your thread, mark the thread "Solved" by going to the "Thread Tools" dropdown at the top of the thread. You might also consider rating the thread by going to the "Rate Thread" dropdown.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •