Results 1 to 9 of 9
  1. #1
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Macro for Outlook (Office 2000 Outlook)

    I wanted to save time in Outlook because the main company person I eamil almost daily is not in the selection
    directory, they are under old email system. Therefore I have to type name@interstatebrands.com every time
    I made a table in MS word like the form you get in Outlook when you want to send a new email. I then used the Tools
    Macro record feature and below is what I got. Well it works great in the MS Word Table but faults out when I imported it
    into the VB of Outlook. I admit I know nothing about Visual Basic, I used to program some in BASIC and BASICA :-()
    Would someone out there convert the following where it would work in Outlook. I am attempting on the first line to
    put the address: name@interstatebrands.com, then (tab), (tab) type in the information "Request Forms" (tab)
    type in a "greeting" (enter) then space over some and enter the " Thank you for your assistance, as always"
    this would save valuable time and I know how to assign a macro to a button on the tool bar already.
    Thank you .... Richard


    Sub Email_enter()
    '
    ' Email_enter Macro
    ' Macro recorded 2/5/2006 by R.J.B. Phillips III
    '
    Selection.TypeText Text:="person@interstatebrands.com"
    Selection.MoveRight Unit:=wdCell
    Selection.MoveRight Unit:=wdCell
    Selection.TypeText Text:="request forms"
    Selection.MoveRight Unit:=wdCell
    Selection.TypeText Text:="Hello"
    Selection.TypeParagraph
    Selection.TypeText Text:=" Thank you for the assistance,"
    End Sub
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    Do you use Word as your e-mail editor in Outlook?

  3. #3
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    I am uncertain as how to answer this, I click on the tool bar icon when I am in the inbox and it pops up the new email form I know the footer came through Microsoft Word because when making my signature in Outlook.
    I used TOOLS, OPTIONS, MAIL FORMAT (TAB), SIGNATURE PICKER, EDIT, ADVANCED EDIT OPTION. I then ended up
    in MS WORD, but on the regular email new I think it is the outlook one ???
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    Select Tools | Options..., and activate the Mail Format tab. Is the check box "Use Microsoft Word to edit e-mail messages" ticked? If so, you use Word as your mail editor. If the check box is clear, you are using the built-in Outlook mail editor.

  5. #5
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    No it was not, I did check the box, tried making a new email when it loaded the copy of MS WORD, I went tools macro
    but all the options were grayed out, I could not even select a macro now <img src=/S/sad.gif border=0 alt=sad width=15 height=15>
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    Try the following:
    - Activate Outlook.
    - Activate the Visual Basic Editor (Alt+F11)
    - Create a new module (Insert | Module)
    - Copy the following code into the module:

    Sub NewMail()
    With Application.CreateItem(olMailItem)
    .Recipients.Add "person@interstatebrands.com"
    .Subject = "Request forms"
    .Body = "Hello," & vbCrLf & vbCrLf & "Thank you for the assistance"
    .Display
    End With
    End Sub

    You can give the macro another name, of course.
    Switch back to Outlook.
    Select Tools | Customize... and create a toolbar button for the macro.

    As you will find, you get a warning each time you try to run the macro. This is to protect you against macro viruses that try to send mails on your behalf. If the warning annoys you (and it will!), download and install the free utility ClickYes.

  7. #7
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    The above code worked great, I edited the changes to fit my need, I did not get asked about running the macro ??
    the only other request if not real hard is can you have the courser end up at the end of the text line ? At this time
    it jumps to where the Hello starts ?
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    Outlook VBA is rather limited in some ways; as far as I know you cannot influence the position of the insertion point.

  9. #9
    2 Star Lounger rjbphillipsiii's Avatar
    Join Date
    Mar 2003
    Location
    Memphis, Tennessee, USA
    Posts
    187
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Macro for Outlook (Office 2000 Outlook)

    Thanks again, everything is great, I was just trying to get the courser move to the end of the line you had it type for me
    I figured out the other. where you had "Thanks for your assistance" I just put, " Thanks for your assistance"
    R.J.B. Phillips III
    Logical Systems Inc. Part Time Drafter
    IBC WONDER HOSTESS Retired 33+ years
    Firestone Tr & Rubber Company 15 Years rjbphillipsiii@yahoo.com

Posting Permissions

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