You need to sign in to do that
Don't have an account?
Spooner
Outlook VBA Question
Hi,
I'm VERY new to the developer side of Salesforce, having used the Salesforce product within our Support department in my current role.
I didn't really know where to post this, but here goes...
I would like to connect to our Salesforce DB from within both Outlook and possibly Excel using the VBA coding area from both.
Could someone explain how I go about this and whether it's possible. I assume that it is possible from the various threads I've read so far, but if someone could maybe provide some examples of how to connect to the DB as a particular user and extract data from the database that would be great.
Many many thanks!!!!
I'm VERY new to the developer side of Salesforce, having used the Salesforce product within our Support department in my current role.
I didn't really know where to post this, but here goes...
I would like to connect to our Salesforce DB from within both Outlook and possibly Excel using the VBA coding area from both.
Could someone explain how I go about this and whether it's possible. I assume that it is possible from the various threads I've read so far, but if someone could maybe provide some examples of how to connect to the DB as a particular user and extract data from the database that would be great.
Many many thanks!!!!
This will work. Need to add the the referance to the SFDCExceladd-in THE VBA moidule (Tools, Referances). Login first via the toolbar. This saves the username. There after the code can enter the password.
Sub Mylogin()
Dim AltKey As String
Dim CtrlKey As String
Dim ShiftKey As String
Dim TabKey As String
Dim EnterKey As String
Dim Password1 As String
Dim UserName As String
'--------------------------
AltKey = "%"
CtrlKey = "^"
ShiftKey = "+"
TabKey = "{TAB}"
EnterKey = "~"
Password1 = ""
UserName = ""
Sheets("Main").Select
If Not (SFDCExcelAddin.CommandBarRelated.IsLoggedIn) Then
AppActivate ("Microsoft Excel")
Application.Wait Now + TimeValue("00:00:03")
Application.SendKeys "{Tab}"
Application.Wait Now + TimeValue("00:00:03")
Application.SendKeys Password1
Application.SendKeys "{Tab}"
Application.SendKeys EnterKey
SFDCExcelAddin.CommandBarRelated.Login
End If
Application.StatusBar = "Login Complete"
Application.Wait Now + TimeValue("00:00:03")
Range("B21").Select
Application.StatusBar = ""
Application.Run "RefreshAll"
End Sub
Sub SF_login()
Application.StatusBar = " "
If Not SFDCExcelAddin.IsLoggedIn Then SFDCExcelAddin.Login
SFDC_Login = SFDCExcelAddin.IsLoggedIn
Application.StatusBar = "Login to SalesForce Complete"
End Sub
Sub SF_LogOff()
If SFDCExcelAddin.IsLoggedIn Then SFDCExcelAddin.Logoff
SFDC_Logout = SFDCExcelAddin.IsLoggedIn
End Sub
Roy Dumlao