Results 1 to 2 of 2

Thread: VB6 and Exchange

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2001
    Location
    Richmond, VA
    Posts
    59

    VB6 and Exchange

    I have written a small routine that uses the MAPI controls to read from an Exchange InBox. What I am strying to do is read all email from the Inbox and if there is an attachment save it to predefined location. This part of the routine works.
    However, I can only see the first 8 characters of the attachment name. I look at the .attachmentPathName and AttachmentName properties and they both only show the first 8 characters.
    Is there a way to fix this??

  2. #2
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    My system (Outlook 2000, accessing Exchange v5.5) shows full length filenames with the VB Script code below.
    When you say "only 8 characters" is that a valid DOS shortname, or only the first 8 characters of the full name?
    VB Code:
    1. msgbox "Listing attachments in Outlook . . ."
    2. set out=WScript.CreateObject("Outlook.Application")
    3. set mapi=out.GetNameSpace("MAPI")
    4. Set myItems = MAPI.GetDefaultFolder(6).Items
    5.  
    6. for each myItem in MyItems
    7.     if myItem.CLASS = "43" then
    8.         for each Attachment in myItem.Attachments
    9. '
    10. ' For any mail item (class 43) with an attachment, check its name
    11. '
    12.     msgbox "FOUND IN: " & myItem.PARENT & ".
    13. SUBJECT = " & myItem & ". ATTACHMENT = " & Attachment
    14.          next
    15.     end if
    16. Next
    17.  
    18. msgbox "No more attachments in Inbox . . ."

Posting Permissions

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



Click Here to Expand Forum to Full Width