Recent content by mdarnold

  1. M

    button to send and print emails

    Thanks! I also had to define myWS (add Dim myWS As Object), but after that it worked like a charm. Thanks so much for your help!
  2. M

    button to send and print emails

    I think this might work, but I can't test it at home; I'll check tomorrow at work. Can you let me know if you see anything obviously wrong with it? Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) If TypeOf Item Is Outlook.MailItem And Item.Categories = "Print" Then...
  3. M

    button to send and print emails

    Took me a little time to look into this, but I found the key and values. HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Printing\PrintTypesDefault\100: 0x0000000C HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Printing\PrintTypesDefault\100: 0x0000000D Is there an...
  4. M

    button to send and print emails

    Thanks for your reply. Too bad it works that way. Do you know of a way to set the Print Style using vba? I'm wondering if I could set up another print style that doesn't refer to the total pages for when I print using code, and have the code use that print style automatically.
  5. M

    button to send and print emails

    Have you had time to look into this Diane? I was wondering if a workaround would be to use VBA to paginate instead of using the page style print options, however I have no idea how to do this, or if it's even possible. Do you think that would work?
  6. M

    button to send and print emails

    The macro has worked great, but I've ran into a glitch. In my default print style I have the footer set up to print the page numbers as 'Page [Page #] of [Total Pages]'. Whenever I print out an email using my send + print button, the pagination is in the format "Page x of 0" (It detects the...
  7. M

    button to send and print emails

    Thank-you so much Diane. I added a line to remove the category before it prints. It works beautifully. Option Explicit Private WithEvents Items As Outlook.Items Private Sub Application_Startup() Set Items = Session.GetDefaultFolder(olFolderSentMail).Items End Sub Private Sub...
  8. M

    button to send and print emails

    Thank-you, I did run into the Item.PrintOut error, after I got that macro working. It wouldn't reach that point in the code previously because my category was in lowercase. So it works, but it doesn't do what I need it to do. The message is printing before the message is actually sent, so...
  9. M

    button to send and print emails

    I found the mistake in my code. I sheepishly discovered that I was assigning a lowercase 'print' category, and looking for an uppercase 'Print' category. Oops. The second code is now picking up the Print category, but I now get the error "Run-time error '424': Object Required", and the...
  10. M

    button to send and print emails

    It's not working for me. Here's exactly what I did. I have these two codes in 'ThisOutlookSession': Sub SendPrint() Dim obj Dim oCategory As Outlook.Category Set obj = ActiveInspector.CurrentItem Set objOL = CreateObject("Outlook.Application") If Not objOL.ActiveInspector...
  11. M

    button to send and print emails

    I meant "print " category. I didn't see an option to edit my post.
  12. M

    button to send and print emails

    Yes, the message will be assigned with the "Trash" category when it is sent to the outbox (and then the Sent Items folder).
  13. M

    button to send and print emails

    Also tried adding the following code to ThisOutlookSession, which seemed straightforward enough: Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean) If TypeOf Item Is Outlook.MailItem And Item.Categories = "Print" Then Mail.PrintOut End If End Sub...
  14. M

    button to send and print emails

    Hi, I'm a novice to VBA, however I'm working on a button to provide an option to send and print emails with a click of the button. I want all of the header information included in the printouts (such as the date it was sent), so I can only print the emails after they have actually been sent...
Top