Lync 2013 SDK and Changing Location information

willgonz

New member
Joined
Aug 31, 2015
Messages
1
Programming Experience
10+
With the Lync SDK you can change your busy and status via code.
But I want to programmatically change my Location based on which subnet I am on. Here is how Microsoft says to use it.http://msdn.microsoft.com/en-us/library/office/JJ278107.aspx But I can't figure out how to implement it. Any ideas?

He is the method to do this:
VB.NET:
[COLOR=green][FONT=Consolas]'Declaration[/FONT][/COLOR][COLOR=blue]Public[/COLOR] [COLOR=blue]Function[/COLOR] BeginPublishContactInformation ( _
    items [COLOR=blue]As[/COLOR] IEnumerable(Of KeyValuePair(Of PublishableContactInformationType, [COLOR=blue]Object[/COLOR])), _
    selfCallback [COLOR=blue]As[/COLOR] AsyncCallback, _
    state [COLOR=blue]As[/COLOR] [COLOR=blue]Object[/COLOR] _
) [COLOR=blue]As[/COLOR] IAsyncResult
[COLOR=green]'Usage[/COLOR]
[COLOR=blue]Dim[/COLOR] instance [COLOR=blue]As[/COLOR] Self
[COLOR=blue]Dim[/COLOR] items [COLOR=blue]As[/COLOR] IEnumerable(Of KeyValuePair(Of PublishableContactInformationType, [COLOR=blue]Object[/COLOR]))
[COLOR=blue]Dim[/COLOR] selfCallback [COLOR=blue]As[/COLOR] AsyncCallback
[COLOR=blue]Dim[/COLOR] state [COLOR=blue]As[/COLOR] [COLOR=blue]Object[/COLOR]
[COLOR=blue]Dim[/COLOR] returnValue [COLOR=blue]As[/COLOR] IAsyncResult

returnValue = instance.BeginPublishContactInformation(items, _ [COLOR=#000000][FONT=Consolas] selfCallback, state)[/FONT][/COLOR]
 
My first thought would be:
Dim items As New Dictionary(Of PublishableContactInformationType, Object)

items.Add(PublishableContactInformationType.LocationName, myLocationName)

mySelf.BeginPublishContactInformation(items, Nothing, Nothing)
 
Back
Top