AllExperts > VB Script 
Search      
VB Script
Volunteer
Answers to thousands of questions
 Home · More VB Script Questions · Answer Library  · Encyclopedia ·
More VB Script Answers
Question Library

Ask a question about VB Script
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Subbu
Expertise
I can answer VB Script questions which are related to Visual Basic / VBA / QTP Scripts.

Experience
8 Years

Education/Credentials
Master of Computer Applications

Awards and Honors
Established Member from QA Forums and Brainbench certification

 
   

You are here:  Experts > Computing/Technology > Basic > VB Script > Run a scipt to save an outlook attachment to a specific file path

VB Script - Run a scipt to save an outlook attachment to a specific file path


Expert: Subbu - 9/17/2009

Question
Hi Subbu,

I am a complete beginner to VBSCripting and have been asked to write a script that, once run, will save the attachments from an email to a specific file path. It only needs to work for one email not the whole inbox. I have searched the internet and so far have drawn a blank, any help would be greatly appreciated.

Kind regards,

John

Answer
John,

Sorry for late reply, I am very good in Lotus Notes email, even though I will try.

have you done some R & D?  If yes please share with me that would more helpful to me.

For your reference here is my code which I wrote for Lotus Notes Meeting Invitation:

Dim db, serverNAB As NOTESDATABASE
Dim view As NOTESVIEW
Dim doc As NOTESDOCUMENT
   Set session = CreateObject("Notes.NotesSession")
   'get the name of the mailfile of the current user
   dblocation = session.GETENVIRONMENTSTRING("MailFile", True)
   'Get the notesdatabase for the mail.
   Set db = session.CURRENTDATABASE
   Set Maildb = session.GETDATABASE("", dblocation)
   If Maildb.ISOPEN = True Then
       WasOpen = 1 'Already open for mail
   Else
       Maildb.OPENMAIL 'This will prompt you for  password
   End If
   
   Set serverNAB = session.GETDATABASE(db.SERVER, "names.nsf")
   Set view = serverNAB.GETVIEW("($Users)")
   
   'Set Mail Document Properties
   Set MailDoc = Maildb.CREATEDOCUMENT
   Dim cdoc As Object
   Set cdoc = Maildb.GETPROFILEDOCUMENT("calendarprofile")


Add to this Answer   Ask a Question


 
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.