PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Extracing out data to save into a word file or excel file
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Extracing out data to save into a word file or excel file
![]() |
Extracing out data to save into a word file or excel file |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
I work for a company that receives auto receipts for work that has been
processed and properly ingested. My question for you, is there a way for a specific line of data to be extracted out and dropped into a XLS file or a word doc? There is always going to be a line of data called "Summary report:" the information that I need is contained directly after this line, there is also always going to be in the subject line the word "receipt". I can of course set up a folder for these but to extract the data out is where I am running into problem. Please help if you can. Thanks. |
|
|
|
#2 |
|
Guest
Posts: n/a
|
' Startposition of ,"summary report:" if it is unique, regardless of
lower or upper characters: posStart=InStr(1,mailitem.body,"summary report:",vbtextcompare) ' Setting the pos to the end of the searched string: posStart=posStart+len("summary report:") ' Looking for the end after the searched string if this end is signed e.g. by a "return": posEnd=InStr(posStart,mailitem.body,vbcrlf,vbtextcompare) ' Extracting the string between start and end position: res$=mid$(mailitem.body,posStart,posEnd-posStart) -- Viele Grüße Michael Bauer "J Chew" <JChew@discussions.microsoft.com> wrote in message news:61AAF672-00F5-45BD-BC8D-701D00DCB83F@microsoft.com... > I work for a company that receives auto receipts for work that has been > processed and properly ingested. My question for you, is there a way for a > specific line of data to be extracted out and dropped into a XLS file or a > word doc? There is always going to be a line of data called "Summary report:" > the information that I need is contained directly after this line, there is > also always going to be in the subject line the word "receipt". I can of > course set up a folder for these but to extract the data out is where I am > running into problem. Please help if you can. Thanks. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

