shiv Posted September 3, 2013 Share Posted September 3, 2013 Hi All, I want to read and print the file name(say: index.txt) from an attachment in a mail which is present in the inbox using Microsoft outlook2010, can anybody suggest which function can i use to do this. Thanks. vis Link to comment Share on other sites More sharing options...
orbs Posted September 3, 2013 Share Posted September 3, 2013 search the forum for water's OutlookEx UDF. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
shiv Posted September 3, 2013 Author Share Posted September 3, 2013 I have already gone through water's OutlookEx UDF but it does not contain any help for the functionality which i have mentioned above. Link to comment Share on other sites More sharing options...
orbs Posted September 3, 2013 Share Posted September 3, 2013 _OL_ItemAttachmentGet(). look at element 2 of the return array: Return Value Success: two-dimensional one based array with the following information: 0 - Object to the attachment 1 - DisplayName: String representing the name, which does not need to be the actual file name, displayed below the icon representing the embedded attachment 2 - FileName: String representing the file name of the attachment 3 - PathName: String representing the full path to the linked attached file 4 - Position: Integer indicating the position of the attachment within the body of the item 5 - Size: Integer indicating the size (in bytes) of the attachment 6 - Type: OlAttachmentType constant indicating the type of the specified object Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
shiv Posted September 3, 2013 Author Share Posted September 3, 2013 thanks, I red that code but that code is not clear to me. is there some other easy way that, if we can open the mail , then click on the attachment, and then we can read the attached file name Link to comment Share on other sites More sharing options...
orbs Posted September 3, 2013 Share Posted September 3, 2013 so if manual is your way, how about create Outlook macro like this: http://superuser.com/questions/288083/macro-to-download-selected-messages-attachments-problem-about-downloaded-files this is used to save attachments of selected messages, but it can be easily modified to just get the name. although this is no longer AutoIt-specific, but Outlook-specific task, and if you are anyway clicking in Outlook, it's easier to use macro. Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
shiv Posted September 3, 2013 Author Share Posted September 3, 2013 Hi orbs, The code available on link provided by you can not do what i want. i,m sorry to say that even if i try to modify that ,there is nothing which i can use to get the attached file name. i am stuck what to do. Link to comment Share on other sites More sharing options...
shiv Posted September 3, 2013 Author Share Posted September 3, 2013 Hi orbs, The code available on link provided by you can not do what i want. i,m sorry to say that even if i try to modify that ,there is nothing which i can use to get the attached file name. i am stuck what to do. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now