Page 1 of 2 12 LastLast
Results 1 to 15 of 29
  1. #1
    New Lounger
    Join Date
    Nov 2002
    Location
    Indianapolis, Indiana, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Outlook's default "Memo Style" print style doesn't cut the mustard with our attorneys, who want to be able to print off a "Sent Item" so that the hard copy displays 1.) a list of all recipients of the email, whether in To, Cc, or Bcc fields; and 2.) a complete list of all files attached to the email.

    Any recommendations? Are there add-ins already out there, or some VBA code I could adapt to do this? What about customizing a copy of the built-in "Memo" print style? Thanks for your ideas.

    Andre Madar

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Regarding item 1), printing BCC recipients, see the following threads:

    Print BCC field in sent message

    BCC doesn't show when you print from sent items (2000)

    Regarding item 2), listing all attachments, mine show as little icons at the top of the message body. What kind of display are they looking for??

  3. #3
    New Lounger
    Join Date
    Nov 2002
    Location
    Indianapolis, Indiana, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Thanks for the threads! I didn't find them when I searched the Lounge for "BCC", maybe I was doing something wrong.

    The icon embedding within the message body is OK for attachments with short filenames, but many of our attorneys have to attach files whose names are LOOONG (plus our document management system tacks on additional numbers at the beginning of an already long file title). These long names are often cut off in "icon view." Some way to parse out the filename and add it to the end of the message or something would be great, but I'm trying to keep the time & effort involved within realistic limits... <img src=/S/money.gif border=0 alt=money width=17 height=15>
    apm

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    I like the SendKeys part. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I'm afraid that for a law firm, the only thing scarier than not having a paper record of what you sent is modifying the electronic record of it! Can the macro run before the message is sent? In that case, it would be quite useful, assuming either that the attorneys remember to run it manually or it is built into the Send command (via an event handler perhaps).

    Upon further review: You already covered this in your first sentence. Cool!

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    You, the master, are asking me, the student? <img src=/S/confused.gif border=0 alt=confused width=15 height=20> Most of what little I learned about OL I learned from you and a few other OL codemasters, and 80% of that code WAS from you. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I only know how to mess with the client side (IOW, my running copy of OL), not the server side. Without doubt the above code could be run from the

    Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

    event, in which case each item sent is passed to the function by the event so the item doesn't need to be separately declared. I haven't tried this because the code snippet above is part of a macro attached to a button to save attached files and write the filename into the mail item text.

    The other standard exposed events are Application_NewMail, Application_Quit, Application_OptionsPagesAdd, Application_Reminder, and Application_Startup, so I don't know how else the using of full length file names could be added to e-mail text unless it's done manually via a button, or you get into class modules or wrappers which are beyond my ken.

    I suppose you could do it on Quit, but aren't all the items released by the time the Quit event fires?

    As to:

    >for a law firm, the only thing scarier than not having a paper record of what you sent is modifying the electronic record of it!

    I have not met many messages I couldn't edit (the ones I can't mess with are usually written in a HTML editor). I sometimes edit messages to remove personal remarks out ("how are the kids?" stuff), or combine related messages to reduce duplication ... and every once in a while to correct my errors or cover my butt. If I was a law firm I sure as heck wouldn't rely on e-mails as a valid unequivocal source of facts.

    Or am I off the topic?
    -John ... I float in liquid gardens
    UTC -7ąDS

  6. #6
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    > If I was a law firm I sure as heck wouldn't rely on e-mails as a valid unequivocal source of facts.
    That's what digital signatures are for. No one can trust the content of an unsigned e-mail for any purpose, except possibly social chat.

    StuartR

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    An EXCELLENT point.

    Corollary to your point, both my bride and I work here in the US with certain information which is legally mandated to be maintained as confidential and which would be part of discovery materials in the event of legal action. Do our employers require us to use encryption or digital signatures?

    Nope.
    -John ... I float in liquid gardens
    UTC -7ąDS

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    > master

    Not!!

    Anyway, I completely agree that the ItemSend event, if that happens automatically when the user hits Send, is the right place to add the info. This way, the message as saved by the user, and as received by the recipient, and as printed, will be consistent.

    I also am sorely tempted to try to work on a bigger solution to the printing issue, because I still would often like to print only the first page of a long thread (more often than not, everything after the first half page already is in the file). But I can only think high-level thoughts about that right now due to other obligations...

  9. #9
    New Lounger
    Join Date
    Nov 2002
    Location
    Indianapolis, Indiana, USA
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Our law firm of 600+ also does not require (or even actively recommend) any encryption/digital signatures etc.

    I'm a rank amateur at VBA, but I think I get the gist of the code posted above. A couple of points/questions:
    1. How exactly do I get this code to "fire" when then user presses "Send?" Would I need to substitute the code somehow for the default OL "Send" command?
    2. How does the user's preferred choice of Mail Format (HTML, Rich Text, or Plain Text) fit into the picture? I'm not clear on what the last few lines are doing...
    3. Assuming this solution fits our attorneys' needs, I anticipate many of them wanting it. Any advice on medium-to large scale deployment?
    4. Thanks!

    apm

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    I hope John can help with some of these!

    For one person or a few, you can intercept events by adding code into VBA's single global macro container, VbaProject.OTM (typically under cocuments and Settings<user>Application DataMicrosoftOutlook or its equivalent for their OS). I think this is straightforward when using ThisOutlookSession, but I haven't ever done it. Note: When you save macros in the VB Editor started from inside Outlook, this is where they go.

    But... for a large deployment, it would make more sense to write a COM Add-in. A COM Add-in is about 90% the same as an Outlook macro, but you build the event hooks differently (see <!post=Post #92036,92036>Post #92036<!/post> for an example). A COM Add-in is a DLL which can be compiled using MS Office Developer edition, or perhaps with VB (not sure about that) and can be deployed using a standard setup.exe approach. There was a recent discussion of the pro/con of COM Add-ins somewhere in the Lounge. It adds extra work, but compared with dozens or hundreds of individual template modifications, I think it makes sense to do it. You also don't have to worry about the macro security warning every time Outlook starts, unlike macros in VbaProject.OTM.

    If you have other things to do, it makes sense to tap into your IT resources (or hire some) to get the above together. Other than the problem of people using Word as their mail editor, it shouldn't take too terribly long to create the code.

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Gee, I was gonna write the client side code if you can do the COM conversion, which I have had no experience with (and time is not likely to permit)! <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15>
    -John ... I float in liquid gardens
    UTC -7ąDS

  12. #12
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Adding complete file name in text format won't be too hard. Jefferson got me started on it in the thread beginning with <post#=74495>post 74495</post#>. Part of the code I ended with follows, you would need to convert this to be triggered by the Application_ItemSend Event:

    [Edit: new code}
    Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)
    Dim attFile As Attachment
    Dim strItemText As String
    If TypeName(Item) = "MeetingItem" Or TypeName(Item) = "MailItem" Then
    If Err.Number Or Item.Attachments.Count = 0 Then Exit Sub ' Err.Number if TypeName fails
    ' dunno/don't care how to handle when Word is set as Editor, so avoid it
    If ActiveInspector.EditorType = olEditorWord Then
    MsgBox "Not set up for Word as editor," & vbLf & _
    "no action will be taken.", vbExclamation
    Exit Sub
    End If
    For Each attFile In Item.Attachments
    strItemText = strItemText & "Attachment:
    -John ... I float in liquid gardens
    UTC -7ąDS

  13. #13
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    See the attachment, the code goes in the ThisOutlookSession Object; see the Object and Procedure dropdowns on the top of the code window. I rewrote the original code snippets to provide a full example and posted it above in my earlier post. It's written only for success (IOW, may need more error checking). I have no experience in COM conversions, and will not have tome to learn. Good luck!
    Attached Images Attached Images
    -John ... I float in liquid gardens
    UTC -7ąDS

  14. #14
    5 Star Lounger
    Join Date
    May 2001
    Location
    Washington, USA
    Posts
    750
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    So, Outlook strikes the enterprise once again. You really shouldn't use the Outlook project to deploy a solution to more than a few people. It's too hard to deploy and manage, and is not secure. The add-in approach is the way to go. I'd recommend VB6 for this because it has a new project wizard that will set up a shell with all the hooks. Also, it seems like some time back I saw a download on MSDN that set up a VB 6 shell that was already tweeked for Outlook. Does that ring a bell for anyone?

    You don't have to use VB. Any product that can produce a dll will work. It's just that a lot of the setup is done for you with VB.

  15. #15
    Lounger
    Join Date
    Mar 2001
    Location
    Tampa, Florida, USA
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Add BCC recipients & attachments list to hardcopy? (2002 SP1)

    Following (trying to anyway) this thread with great interest.

    Wasn't there some previous version of Outlook that did print the filenames of attachments? Or maybe it's Outlook Express?

    I don't even get the icons-representing-attachments when I print, so I've been trying to implement your sample code, but to no avail. I've tried to create a macro (assigning it to a button). Any tips on how an end-user could implement this on his machine (Outlook 2002 SP1)?

    For example, if put in "MsgBox ("TypeName(Item) = " & TypeName(Item))", as a debugging procedure, to see why the code would not execute. The message box reports TypeName to be "Empty", so I must be doing something wrong.

Page 1 of 2 12 LastLast

Posting Permissions

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