Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
oOut = CreateObject("outlook.application")
oNameSpace = oOut.GetNameSpace("MAPI")
oInBox = oNameSpace.GetDefaultFolder(6)
WITH oInBox
FOR EACH loM IN .Items
* Display each email; obviously you will want to
* store these items somewhere rather than just
* showing them on the screen
? loM.SenderName
? loM.Subject
? loM.Body
ENDFOR
ENDWITH
loApp = CREATEOBJECT("outlook.application")
loSpace = loApp.GetNameSpace("MAPI")
loFolders = loSpace.Folders
loItems = loSpace.Folders.Items && [b][COLOR=#EF2929]It fails here[/color][/b]
FOR lni = 1 TO loSpace.Folders.Count
lcName = loSpace.Folders(lni).Name
? lcName
ENDFOR
*Folders are hierarchical so each folder can contain their own set of folders as well.
FOR lni = 1 TO loSpace.Folders.Count
loFolders = loSpace.Folders(lni).Folders
FOR lnSub = 1 TO loFolders.Count
lcName = loFolders.Folders(lni).Name
? lcName
ENDFOR
ENDFOR
loApp = CREATEOBJECT("outlook.application")
loSpace = loApp.GetNameSpace("MAPI")
FOR EACH loFolder IN loSpace.Folders
? loFolder.Name
FOR EACH loSubFolder IN loFolder.Folders
? CHR(9)+loSubFolder.Name
ENDFOR
ENDFOR
FOR EACH loSubFolder IN loFolder.Folders
IF loSubFolder.Name = "Inbox"
FOR EACH Email IN loSubFolder.Items
APPEND BLANK
REPLACE body WITH Email.body
REPLACE made_time WITH Email.CreationTime
TRY
REPLACE gotbyname WITH Email.ReceivedByName
CATCH
ENDTRY
REPLACE got_time WITH Email.ReceivedTime
TRY
REPLACE got_name WITH Email.Recipients.Item.name
CATCH
ENDTRY
REPLACE senderadd WITH Email.SenderEmailAddress
REPLACE sendrname WITH Email.SenderName
REPLACE sent_on WITH Email.SentOn
REPLACE Esize WITH Email.Size
REPLACE subject WITH Email.Subject
TRY
REPLACE Send_to WITH Email.To
CATCH
ENDTRY
TRY
REPLACE html WITH Email.HTMLBody
CATCH
ENDTRY
Validate_Email()
ENDFOR
ELSE
ENDIF
ENDFOR