| Author |
Message |
NiceTim
Guest
|
Posted:
Thu Nov 11, 2004 1:41 am Post subject:
Another Calendar Label question |
|
|
Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Thu Nov 11, 2004 10:13 am Post subject:
Re: Another Calendar Label question |
|
|
What errors are you getting ? the following webdav proppatch works okay for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": " &
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please check your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": " &
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
| Quote: | Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046} |
/82140003=" + iLabel
| Quote: |
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
NiceTim
Guest
|
Posted:
Thu Nov 11, 2004 10:03 pm Post subject:
Re: Another Calendar Label question |
|
|
Glen,
I am not sure how i would apply this code to what i am using.
I build all the other properties into a string variable called sPostData and
then post it to the OWA with the ?cmd=apptsave
I dont think its webdav, but an OWA type form post.
Its not giving any errors, but its also not setting the label.
Here is what i was testing with:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}/0x8214=6"
but it just gets ignored i think because the label never gets set, and if i
use Outlook Spy and look at all the properties, the label property is not
even there.
If i had the msg id, could i use webDav to update the propertys?
Or is there a way i can use this when i create the appointment?
Thanks
Tim
"Glen Scales [MVP]" wrote:
| Quote: | What errors are you getting ? the following webdav proppatch works okay for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": " &
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please check your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": " &
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
Glen Scales [MVP]
Guest
|
Posted:
Fri Nov 12, 2004 10:14 am Post subject:
Re: Another Calendar Label question |
|
|
Did this ever work ? as far as im aware (and i may be wrong) OWA doesn't
give you label functionality. I wouldn't expect the apptsave function to
support it in this case.
You could use Webdav to update the properties if you have the messageID
(although the dav:href (the URL) would make it a lot easier). One method
would be to search for the appointment based on message id and then mod the
returned href
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_searching_calendar_folders_webdav.asp.
It really depends what environment your programming in but you could create
the appointment in webdav and set the property then there's a sample on how
to do this in the SDK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp .
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:67D65C64-6470-44DE-A0B9-9321112E6583@microsoft.com...
| Quote: | Glen,
I am not sure how i would apply this code to what i am using.
I build all the other properties into a string variable called sPostData
and
then post it to the OWA with the ?cmd=apptsave
I dont think its webdav, but an OWA type form post.
Its not giving any errors, but its also not setting the label.
Here is what i was testing with:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046} |
/0x8214=6"
| Quote: |
but it just gets ignored i think because the label never gets set, and if
i
use Outlook Spy and look at all the properties, the label property is not
even there.
If i had the msg id, could i use webDav to update the propertys?
Or is there a way i can use this when i create the appointment?
Thanks
Tim
"Glen Scales [MVP]" wrote:
What errors are you getting ? the following webdav proppatch works okay
for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": " &
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please check
your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": " &
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
NiceTim
Guest
|
Posted:
Sat Nov 13, 2004 3:29 am Post subject:
Re: Another Calendar Label question |
|
|
Glen,
Thanks again for all your help.
Ok i am going to try the webDav approach for creating the appointment.
Is there anyway to return the message ID when i create the initial
appointment?
I dont want to have to search for the appointment later for updates and
deletes. so i want to keep the ID for tracking purposes.
Thanks
Tim
"Glen Scales [MVP]" wrote:
| Quote: | Did this ever work ? as far as im aware (and i may be wrong) OWA doesn't
give you label functionality. I wouldn't expect the apptsave function to
support it in this case.
You could use Webdav to update the properties if you have the messageID
(although the dav:href (the URL) would make it a lot easier). One method
would be to search for the appointment based on message id and then mod the
returned href
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_searching_calendar_folders_webdav.asp.
It really depends what environment your programming in but you could create
the appointment in webdav and set the property then there's a sample on how
to do this in the SDK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp .
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:67D65C64-6470-44DE-A0B9-9321112E6583@microsoft.com...
Glen,
I am not sure how i would apply this code to what i am using.
I build all the other properties into a string variable called sPostData
and
then post it to the OWA with the ?cmd=apptsave
I dont think its webdav, but an OWA type form post.
Its not giving any errors, but its also not setting the label.
Here is what i was testing with:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/0x8214=6"
but it just gets ignored i think because the label never gets set, and if
i
use Outlook Spy and look at all the properties, the label property is not
even there.
If i had the msg id, could i use webDav to update the propertys?
Or is there a way i can use this when i create the appointment?
Thanks
Tim
"Glen Scales [MVP]" wrote:
What errors are you getting ? the following webdav proppatch works okay
for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": " &
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please check
your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": " &
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
NiceTim
Guest
|
Posted:
Sat Nov 13, 2004 5:02 am Post subject:
Re: Another Calendar Label question |
|
|
Glen
I am getting an error (400) Bad Request
I made sure to change all the appropriate values to ones that apply to my org.
By the way i am creating appointments in the public calendar.
Also, what should the value of this be?
' Appointment item.
strApptItem = "testappointment.eml"
can i just leave it at that or should i change it?
Thanks
Tim
"NiceTim" wrote:
| Quote: | Glen,
Thanks again for all your help.
Ok i am going to try the webDav approach for creating the appointment.
Is there anyway to return the message ID when i create the initial
appointment?
I dont want to have to search for the appointment later for updates and
deletes. so i want to keep the ID for tracking purposes.
Thanks
Tim
"Glen Scales [MVP]" wrote:
Did this ever work ? as far as im aware (and i may be wrong) OWA doesn't
give you label functionality. I wouldn't expect the apptsave function to
support it in this case.
You could use Webdav to update the properties if you have the messageID
(although the dav:href (the URL) would make it a lot easier). One method
would be to search for the appointment based on message id and then mod the
returned href
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_searching_calendar_folders_webdav.asp.
It really depends what environment your programming in but you could create
the appointment in webdav and set the property then there's a sample on how
to do this in the SDK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp .
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:67D65C64-6470-44DE-A0B9-9321112E6583@microsoft.com...
Glen,
I am not sure how i would apply this code to what i am using.
I build all the other properties into a string variable called sPostData
and
then post it to the OWA with the ?cmd=apptsave
I dont think its webdav, but an OWA type form post.
Its not giving any errors, but its also not setting the label.
Here is what i was testing with:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/0x8214=6"
but it just gets ignored i think because the label never gets set, and if
i
use Outlook Spy and look at all the properties, the label property is not
even there.
If i had the msg id, could i use webDav to update the propertys?
Or is there a way i can use this when i create the appointment?
Thanks
Tim
"Glen Scales [MVP]" wrote:
What errors are you getting ? the following webdav proppatch works okay
for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": " &
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please check
your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": " &
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
Newbie here,
I am using an XML webservice sample code to create calendar entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
Tom Rizzo [MSFT]
Guest
|
Posted:
Sat Nov 13, 2004 11:51 pm Post subject:
Re: Another Calendar Label question |
|
|
On the label question, make sure you set the datatype to int otherwise it
will be passed as a string which it isn't :)
Tom
--
Looking for a good book on programming Exchange, Outlook, ADSI and
SharePoint? Check out http://www.microsoft.com/MSPress/books/5517.asp
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:640F9CF1-C6BC-45D6-AD91-F84164E6E687@microsoft.com...
| Quote: | Glen
I am getting an error (400) Bad Request
I made sure to change all the appropriate values to ones that apply to my
org.
By the way i am creating appointments in the public calendar.
Also, what should the value of this be?
' Appointment item.
strApptItem = "testappointment.eml"
can i just leave it at that or should i change it?
Thanks
Tim
"NiceTim" wrote:
Glen,
Thanks again for all your help.
Ok i am going to try the webDav approach for creating the appointment.
Is there anyway to return the message ID when i create the initial
appointment?
I dont want to have to search for the appointment later for updates and
deletes. so i want to keep the ID for tracking purposes.
Thanks
Tim
"Glen Scales [MVP]" wrote:
Did this ever work ? as far as im aware (and i may be wrong) OWA
doesn't
give you label functionality. I wouldn't expect the apptsave function
to
support it in this case.
You could use Webdav to update the properties if you have the messageID
(although the dav:href (the URL) would make it a lot easier). One
method
would be to search for the appointment based on message id and then mod
the
returned href
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/e2k3/e2k3/_exch2k_searching_calendar_folders_webdav.asp.
It really depends what environment your programming in but you could
create
the appointment in webdav and set the property then there's a sample on
how
to do this in the SDK
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wss/wss/_esdk_creating_an_appointment_webdav.asp .
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:67D65C64-6470-44DE-A0B9-9321112E6583@microsoft.com...
Glen,
I am not sure how i would apply this code to what i am using.
I build all the other properties into a string variable called
sPostData
and
then post it to the OWA with the ?cmd=apptsave
I dont think its webdav, but an OWA type form post.
Its not giving any errors, but its also not setting the label.
Here is what i was testing with:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/0x8214=6"
but it just gets ignored i think because the label never gets set,
and if
i
use Outlook Spy and look at all the properties, the label property is
not
even there.
If i had the msg id, could i use webDav to update the propertys?
Or is there a way i can use this when i create the appointment?
Thanks
Tim
"Glen Scales [MVP]" wrote:
What errors are you getting ? the following webdav proppatch works
okay
for
me.
sDestinationURL =
"http://servername/exchange/mailbox/Calendar/appointment.EML"
Set XMLreq = CreateObject("Microsoft.xmlhttp")
XMLreq.open "PROPPATCH", sDestinationURL, False
xmlstr = "<?xml version=""1.0"" encoding=""UTF-8"" ?>"
xmlstr = xmlstr & "<a:propertyupdate xmlns:a=""DAV:""
xmlns:b=""urn:schemas-microsoft-com:datatypes"" xmlns:c=""xml:""
xmlns:d=""http://schemas.microsoft.com/mapi/proptag/"">"
xmlstr = xmlstr & "<a:set>"
xmlstr = xmlstr & "<a:prop>"
xmlstr = xmlstr & "<d:x82530003 b:dt=""int"">2</d:x82530003>"
xmlstr = xmlstr & "</a:prop>"
xmlstr = xmlstr & "</a:set>"
xmlstr = xmlstr & "</a:propertyupdate>"
XMLreq.setRequestHeader "Content-Type", "text/xml;"
XMLreq.setRequestHeader "Translate", "f"
XMLreq.setRequestHeader "Content-Length:", Len(xmlstr)
XMLreq.send(xmlstr)
If (XMLreq.Status >= 200 And XMLreq.Status < 300) Then
Wscript.echo "Success! " & "Results = " & XMLreq.Status & ": "
&
XMLreq.statusText
ElseIf XMLreq.Status = 401 then
Wscript.echo "You don't have permission to do the job! Please
check
your
permissions on this item."
Else
Wscript.echo "Request Failed. Results = " & XMLreq.Status & ": "
&
XMLreq.statusText
End If
Cheers
Glen
"NiceTim" <NiceTim@discussions.microsoft.com> wrote in message
news:982611C6-513E-46D9-92FC-4E2C8C1428B9@microsoft.com...
Newbie here,
I am using an XML webservice sample code to create calendar
entries.
I want to be able to set the label colors for these appointments.
I have tried appending this to my post data:
sPostdata +=
"http://schemas.microsoft.com/mapi/id/{00062002-0000-0000-C000-000000000046}
/82140003=" + iLabel
where iLabel = the long value passed to the service.
but i am getting errors now.
Some one please help a newbie.
Thanks
Tim
|
|
|
| Back to top |
|
 |
|
|
|
|