PC Review


Reply
Thread Tools Rate Thread

Auto Detach/print

 
 
=?Utf-8?B?c3RldjM3OQ==?=
Guest
Posts: n/a
 
      27th Sep 2005
I have a script that will print files in a folder on the hard drive (not an
Outlook folder). I'd like have Outlook XP automatically detach files from a
specific sender to this folder. I've used VBS off and on for about 2 years,
but I'm not familiar with scripts in Outllook at all. I found a few things
in this forum that look like they may help, but I'm not sure how to implement
them.

How would I put this in place and set Outlook XP to run it for a specific
sender?
'--------------------
'Posted by Michael Bednarek
Sub PrintAtt()

Dim myAtt As Outlook.Attachment
Dim strTemp As String
Dim objShell As New Shell
Dim objFolderItem As FolderItem

strTemp = Environ("Temp")
For Each myAtt In ActiveInspector.CurrentItem.Attachments
myAtt.SaveAsFile (strTemp & "\" & myAtt.FileName)
Set objFolderItem = objShell.NameSpace(strTemp).Items.Item(myAtt.FileName)
objFolderItem.InvokeVerb ("Print")
'Kill objFolderItem.Path ' Can't delete yet because "Print" runs
asynchronously
Next myAtt
ActiveInspector.Close (olDiscard)
End Sub
'---------------------------

Thanks for any help or suggestions!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
outlook2003 macro auto detach file attachment tomadz General Discussion 0 20th Jul 2011 08:23 AM
Auto Send A report to specific print and print tray neenmarie Microsoft Access Reports 3 17th Dec 2008 04:03 PM
Is there a way to save just one Word doc to print manually and leave default print at auto select? katy Microsoft Word New Users 4 5th May 2008 12:52 AM
how do I auto detach an attachement file to a directory =?Utf-8?B?SmVmZmVyeQ==?= Microsoft Outlook Discussion 1 23rd Jul 2007 04:05 AM
Word attachment in Lotus Notes-prevent detach and print Anna Microsoft Word New Users 1 2nd Oct 2003 04:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:54 PM.