With different credentials.

Y

Yahya

Dear Sirs,

I would like to run the below code using other credentials than the user
running it, how can I use different credentials?

Thank you,
Yahya

Dim msgobj

msgobj = CreateObject("CDO.Message")

msgobj.DataSource.Open(sUrl, , 3)

If msgobj.fields("urn:schemas:httpmail:hasattachment").value = True And
msgobj.fields("DAV:contentclass").value = "urn:content-classes:message" Then

msgobj.attachments.deleteall()

msgobj.fields("urn:schemas:mailheader:keywords").value = "Attachment"

msgobj.fields.update()

msgobj.DataSource.Save()

End If

msgobj = Nothing
 
P

Pipo

Yahya,

Check if the
WindowsIdentity.Impersonate Method
Allows code to impersonate a different Windows user is what you're looking
for
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top