I'm trying to use the GetObject Method in VScript to copy information into a
custom Outlook form:
Set objIE = GetObject(,"InternetExplorer.Application")
objIE.Visible = True
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objFolder = objNS.GetDefaultFolder(6)
Set objItem = objFolder.Items.Add("IPM.Post.GenericDocument")
objItem.Display
Set objPage = objItem.GetInspector.ModifiedFormPages("Message")
objPage.Controls("txtURL").Value = objIE.LocationURL
objPage.Controls("Subject").Value = objIE.LocationName
objItem.BodyFormat = 2
objItem.HTMLBody = objIE.Document.Body.innerHTML
Set objItem = Nothing
Set objIE = Nothing
Set objApp = Nothing
Set objNS = Nothing
Set objFolder = Nothing
Set objPage = Nothing
I get an "Unspecified" error is at
objItem.HTMLBody = objIE.Document.Body.innerHTML
but none of the information ends up in the proper fields and, as far as I
can tell, the script is failing to properly assign the objIE object. Could
someone give me a clue as to what might be wrong?
Thanks,
Tom S.
--
Talent hits a target no one else can hit; Genius hits a target no one else
can see.
-- Arthur Schopenhauer