Hi Rachael,

It looks like you need to set the SoapClient.HeaderHandler property
and create a custom HeaderHandler.  Unfortunately I don't know much
about this process.  Does anyone have any tips for connecting to the
API with VBA?

Best,
- Eric Koleda, AdWords API Advisor

On Sep 22, 8:23 am, rachael <[email protected]> wrote:
> Hi,
>
> Just trying to get the API working for the first time, calling it from
> Excel using a VBA Macro.
>
> Am having real trouble working out how to pass the header information
> over.
>
> Any help much appreciated, and my code is below....
>
> Thanks
>
> Sub testStats()
> Dim ab As Long
>
> ' ab = getStats(1643393080, 10109, 11009)
>
>  Dim objSClient As MSSOAPLib.SoapClient
>  Dim fResult() As String
>  Dim totCost As Long
>  Dim headers As String
>
>  headers = "<email>[email protected]</email><password>xx</
> password><useragent>RM Simon</useragent><developerToken>xx</
> developerToken>"
> ' Define SOAP headers.
>
> '<applicationToken>' . $application_token . '</applicationToken>';
> '<clientEmail>' . $client_email . '</clientEmail>' .
>
>     ' Point the SOAP API to the web service that we want to call...
>     Set objSClient = New SoapClient
>
>     ' Call objSClient.mssoapinit("https://adwords.google.com/api/
> adwords/v13/CampaignService?wsdl")
>     Call objSClient.mssoapinit("https://sandbox.google.com/api/adwords/
> v13/CampaignService?wsdl")
>
>     ' Call the web service
>     fResult = objSClient.getCampaignStats(campaignIds, startDay,
> endDay)
>
>     Set objSClient = Nothing
>
>     ccyConvert = fResult
>
> End Sub
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/adwords-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to