does anyone have any experience with outlook's web app? i am trying to create a routine that when a button is clicked, it will open up outlook web app (through internet explorer), log in and attach a file to a new email. i have gotten so far as to log in and create a new email, but can not seem to get anywhere. any help would be greatly appreciated. code attached (the text "WHOA DUDE" will appear in the subject line)
Sub openinternetexplorer() Dim IEApp As InternetExplorer Dim URL As String Dim I As Integer Set IEApp = New InternetExplorer 'creates new internet explorer application IEApp.Visible = True 'makes IE visible IEApp.navigate ("webmail.technimark.com") Application.Wait (Now + TimeValue("0:00:10")) Do Loop Until IEApp.readyState = READYSTATE_COMPLETE Set ipf = IEApp.document.all.Item("username") ipf.Value = InputBox("enter username") Set ipf = IEApp.document.all.Item("password") ipf.Value = InputBox("enter password") Set ipf = IEApp.document.getElementsByTagName("input") I = 0 Do While I < ipf.Length If ipf(I).Type = "submit" Then Set ipo = ipf(I) Exit Do End If I = I + 1 Loop ipo.Click IEApp.Visible = False Do Loop Until IEApp.readyState = READYSTATE_COMPLETE Set newpage = New InternetExplorer newpage.Visible = True newpage.navigate ("https://webmail.technimark.com/owa/?ae=Item&a=New&t=IPM.Note&cc=MTQuMS4yMTguMTMsZW4tVVMsNDI5NDk2NzI5NSxIVE1MLDAsMA==&pspid=_1307133381266_663185185") Do Loop Until newpage.readyState = READYSTATE_COMPLETE Set ipf = newpage.document.getElementsByTagName("input") I = 0 Do While I < ipf.Length If ipf(I).Type = "text" Then Set ipo = ipf(I) 'SUBJECT LINE Exit Do End If I = I + 1 Loop ipo.Value = "Whoa Dude" Set IEApp = Nothing Set ipo = Nothing Set ipf = Nothing Set newpage = Nothing End Sub
Not sure what you are doing exactly, but I don't think web apps support VBA
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel Tips & Solutions, free examples and tutorials why not check out my downloads
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks