efreedus Posted January 20, 2007 Report Share Posted January 20, 2007 My macro opens emails in a folder and prints each into a separate Acrobat.pdf with "CE" followed by the date and time of the email in the filename. e.g. CE 20060819 8-03 PM.pdf I "grab" the time by opening the email, putting the cursor where the Date Sent always appear, copying to the Clipboard, parsing and tweeking the date and time, and printing to an Acrobat PDF file of that name. What I'm looking for is a way to get Outlook objects into some variables to put more info into the named PDF. I want: SenderName ReceivedByName Subject CreationTime So I thinking either a Macro in Outlook or VBScript (same as a macro?) or VBA code, etc written and "resident" in Outlook to be run as a macro or called by ME. Anyone have such code or point me in the right direction? Quote Link to comment Share on other sites More sharing options...
Cory Posted February 15, 2007 Report Share Posted February 15, 2007 I'm writing a similar macro now. Although I have no solution to the additional fields, I'm wrestling with control handles in multiple windows, I would like to suggest you save it as an .MSG file instead. We were going to do PDF as most of our documentation is that way but it doesn’t preserve the attachments like an MSG file. Also a “File Save as” is very simple. Let me know if you come up with some cool script. I was using the controls to grab the date and subject but ME gets confused with multiple windows open and I'm trying to find a work-a-round. Quote Link to comment Share on other sites More sharing options...
Cory Posted February 15, 2007 Report Share Posted February 15, 2007 I was just looking at your list and you can get all of this from the header I think. My macro is using windows controls to grab the From, To, Subject, and Sent text values. It works much better than mouse clicking and requires no user intervention. My only problem is when the user has more than one message open at a time but I think I'll put in a routine that plows thru all the windows titles and ensures only one with the text " - Message (" appears. Otherwise the controls thing isn't reliable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.