Propósito

✔ Programação GLOBAL® - Quaisquer soluções e/ou desenvolvimento de aplicações pessoais, ou da empresa, que não constem neste Blog devem ser tratados como consultoria freelance. Queiram contatar-nos: brazilsalesforceeffectiveness@gmail.com | ESTE BLOG NÃO SE RESPONSABILIZA POR QUAISQUER DANOS PROVENIENTES DO USO DOS CÓDIGOS AQUI POSTADOS EM APLICAÇÕES PESSOAIS OU DE TERCEIROS.

LISTA DE ESTADOS BRASILEIROS: Sigla, Estado, Capital e Região - Complete List of Brazilian States: Abbreviations, Capitals, Regions, and More for BI and Data Analysis

LISTA DE ESTADOS BRASILEIROS: Sigla, Estado, Capital e Região - Complete List of Brazilian States: Abbreviations, Capitals, Regions, and More for BI and Data Analysis
#ProgramaçãoGlobal  #AC #AL #AM #AP #BA #CE #DF #ES #GO #MA #MG #MS #MT #PA #PB #PE #PI #PR #RJ #RN #RO #RR #RS #SC #SE #SP #TO  #Acre #Alagoas #Amapa #Amazonas #Bahia #Ceara #DistritoFederal #EspiritoSanto #Goias #Maranhao #MatoGrosso #MatoGrossoDoSul #MinasGerais #Para #Paraiba #Parana #Pernambuco #Piaui #RioDeJaneiro #RioGrandeDoNorte #RioGrandeDoSul #Rondonia #Roraima #SantaCatarina #SaoPaulo #Sergipe #Tocantins #Aracaju #BeloHorizonte #BoaVista #Brasilia #CampoGrande #Cuiaba #Cuiaba #Curitiba #Florianopolis #Fortaleza #Goiania #JoaoPessoa #Macapa #Maceio #Manaus #Natal #Palmas #PortoAlegre #PortoVelho #Recife #RioBranco #RioDeJaneiro #Salvador #SaoLuiz #SaoPaulo #Teresina #Vitoria


 Compre OS LIVROS DESTA SÉRIE 


É muito bom ter uma tabela com os estados disponíveis e apenas usá-los não é mesmo?

Abaixo estão disponíveis TODOS os estados brasileiros com suas respectivas siglas, Capital e Região.

Tudo está disposto uma tabela pronta para ser conectada em nossa planilhas ou carregada na tabela de um banco de dados.


No Excel poderá utilizar funções simples tais como PROCV, PROCH ou PROCX e resolver todos os seus problemas:


Sigla Estado Capital Região Region
AC ACRE RIO BRANCO NORTE NORTH
PA PARÁ BELÉM NORTE NORTH
RO RONDÔNIA PORTO VELHO NORTE NORTH
RR RORAIMA BOA VISTA NORTE NORTH
TO TOCANTINS PALMAS NORTE NORTH
MA MARANHÃO SÃO LUIZ NORDESTE NORTHEST
PB PARAÍBA JOÃO PESSOA NORDESTE NORTHEST
PE PERNAMBUCO RECIFE NORDESTE NORTHEST
PI PIAUÍ TEREZINA NORDESTE NORTHEST
RN RIO GRANDE DO NORTE NATAL NORDESTE NORTHEST
SE SERGIPE ARACAJÚ NORDESTE NORTHEST
GO GOIÁS GOIÂNIA CENTRO-OESTE MIDWEST
MS MATO GROSSO DO SUL CAMPO GRANDE CENTRO-OESTE MIDWEST
MT MATO GROSSO CUIABÁ CENTRO-OESTE MIDWEST
ES ESPÍRITO SANTO VITÓRIA SUDESTE SOUTHEAST
MG MINAS GERAIS BELO HORIZONTE SUDESTE SOUTHEAST
RJ RIO DE JANEIRO RIO DE JANEIRO SUDESTE SOUTHEAST
SP SÃO PAULO SÃO PAULO SUDESTE SOUTHEAST
RS RIO GRANDE DO SUL PORTO ALEGRE SUL SOUTH
SC SANTA CATARINA FLORIANÓPOLIS SUL SOUTH
AM AMAZONAS MANAUS NORTE NORTH
AP AMAPÁ MACAPÁ NORTE NORTH
AL ALAGOAS MACEIÓ NORDESTE NORTHEST
BA BAHIA SALVADOR NORDESTE NORTHEST
CE CEARÁ FORTALEZA NORDESTE NORTHEST
PR PARANÁ CURITIBA SUL SOUTH

 


Sim, nós sabemos, nós sabemos, nós sabemos…


Ver essa mensagem é irritante. Sabemos disso. (Imagine como é escrevê-la...). Mas também é extremamente importante. Um dos maiores trunfos do ✔ Brazil SFE® é seu modelo parcialmente financiado pelos leitores. 


1. O financiamento dos leitores significa que podemos cobrir o que quisermos. Não sujeitos a caprichos de um proprietário bilionário. Ninguém pode nos dizer o que não dizer ou o que não reportar.


2. O financiamento dos leitores significa que não precisamos correr atrás de cliques e tráfego. Não buscamos desesperadamente a sua atenção por si só: buscamos as histórias que nossa equipe editorial considera importantes e que merecem o seu tempo.


3. O financiamento dos leitores significa que podemos manter nosso blog aberto, permitindo que o maior número possível de pessoas leia artigos de qualidade do mundo todo.


O apoio de leitores como você torna tudo isso possível. No momento, apenas 2,4% dos nossos leitores regulares ajudam a financiar nosso trabalho. Se você quer ajudar a proteger nossa independência editorial, considere juntar-se a nós hoje mesmo.


Valorizamos qualquer quantia que possa nos dar, mas apoiar mensalmente é o que causa maior impacto, permitindo um investimento maior em nosso trabalho mais crucial e destemido, assim esperamos que considere apoiar-nos. Obrigado!

👉 Siga André Bernardes no LinkedinClique aqui e contate-me via What's App.

Comente e compartilhe este artigo!

brazilsalesforceeffectiveness@gmail.com


 

 Compre OS LIVROS DESTA SÉRIE 

 Série Donut Project 
DONUT PROJECT: VBA - Projetos e Códigos de Visual Basic for Applications (Visual Basic For Apllication)eBook - DONUT PROJECT 2024 - Volume 03 - Funções Financeiras - André Luiz Bernardes eBook - DONUT PROJECT 2024 - Volume 02 - Conectando Banco de Dados - André Luiz Bernardes eBook - DONUT PROJECT 2024 - Volume 01 - André Luiz Bernardes


eBook - PT - Série DONUT PROJECT - Volume 07 - VBA TOP 50 Códigos Mais Importantes - Access — André Luiz BernardeseBook - PT - Série DONUT PROJECT - Volume 07 - VBA TOP 50 Códigos Mais Importantes - Excel — André Luiz Bernardes eBook - PT - Série DONUT PROJECT - Volume 07 - VBA TOP 50 Códigos Mais Importantes - Outlook — André Luiz Bernardes eBook - PT - Série DONUT PROJECT - Volume 08 - VBA TOP 50 Códigos Mais Importantes - Project — André Luiz Bernardes  eBook - PT - Série DONUT PROJECT - Volume 08 - VBA TOP 50 Códigos Mais Importantes - Project — André Luiz Bernardes  eBook - PT - Série DONUT PROJECT - Volume 08 - VBA TOP 50 Códigos Mais Importantes - Word — André Luiz Bernardes

Inline image 1

VBA OFFICE - EXCEL, ACCESS, OUTLOOK, POWERPOINT

VBA OFFICE - EXCEL, ACCESS, OUTLOOK, POWERPOINT


PROJETOS CURTOS OU LONGOS 

Desenvolvo e aprimoro seus Dashboards em MS Excel!


  • DASHBOARDS 
  • SCORECARDS 
  • BSC 
  • REPORTs 
  • Aplicações MS Access  

Conecte suas planilhas ao BI!  


Contate-me: brazilsalesforceeffectiveness@gmail.com





brazilsalesforceeffectiveness@gmail.com

✔ Brazil SFE®Author´s Profile  Google+   Author´s Professional Profile   Pinterest   Author´s Tweets

VBA Outlook - Exportando Campos para o Excel

VBA Outlook - Exportando Campos para o Excel


Vou poupar seu tempo e vamos direto ao código. Explore à vontade!


Option Explicit

 Sub CopyToExcel()
 Dim xlApp As Object
 Dim xlWB As Object
 Dim xlSheet As Object
 Dim rCount As Long
 Dim bXStarted As Boolean
 Dim enviro As String
 Dim strPath As String

 Dim currentExplorer As Explorer
 Dim Selection As Selection
 Dim olItem As Outlook.MailItem
 Dim obj As Object
 Dim strColB, strColC, strColD, strColE, strColF As String
               
' Get Excel set up
enviro = CStr(Environ("USERPROFILE"))
'the path of the workbook
 strPath = enviro & "\Documents\test.xlsx"
     On Error Resume Next
     Set xlApp = GetObject(, "Excel.Application")
     If Err <> 0 Then
         Application.StatusBar = "Please wait while Excel source is opened ... "
         Set xlApp = CreateObject("Excel.Application")
         bXStarted = True
     End If
     On Error GoTo 0
     'Open the workbook to input the data
     Set xlWB = xlApp.Workbooks.Open(strPath)
     Set xlSheet = xlWB.Sheets("Sheet1")
    ' Process the message record
    
    On Error Resume Next
'Find the next empty line of the worksheet
rCount = xlSheet.Range("B" & xlSheet.Rows.Count).End(-4162).Row
'needed for Exchange 2016. Remove if causing blank lines.
rCount = rCount + 1

' get the values from outlook
Set currentExplorer = Application.ActiveExplorer
Set Selection = currentExplorer.Selection
  For Each obj In Selection

    Set olItem = obj
    
 'collect the fields
    strColC = olItem.SenderEmailAddress
    strColB = olItem.SenderName
    strColD = olItem.Body
    strColE = olItem.To
    strColF = olItem.ReceivedTime

' Get the Exchange address
' if not using Exchange, this block can be removed
 Dim olEU As Outlook.ExchangeUser
 Dim oEDL As Outlook.ExchangeDistributionList
 Dim recip As Outlook.Recipient
 Set recip = Application.Session.CreateRecipient(strColC)

 If InStr(1, strColC, "/") > 0 Then
' if exchange, get smtp address
     Select Case recip.AddressEntry.AddressEntryUserType
       Case OlAddressEntryUserType.olExchangeUserAddressEntry
         Set olEU = recip.AddressEntry.GetExchangeUser
         If Not (olEU Is Nothing) Then
             strColC = olEU.PrimarySmtpAddress
         End If
       Case OlAddressEntryUserType.olOutlookContactAddressEntry
         Set olEU = recip.AddressEntry.GetExchangeUser
         If Not (olEU Is Nothing) Then
            strColC = olEU.PrimarySmtpAddress
         End If
       Case OlAddressEntryUserType.olExchangeDistributionListAddressEntry
         Set oEDL = recip.AddressEntry.GetExchangeDistributionList
         If Not (oEDL Is Nothing) Then
            strColC = olEU.PrimarySmtpAddress
         End If
     End Select
End If
' End Exchange section

'write them in the excel sheet
  xlSheet.Range("B" & rCount) = strColB
  xlSheet.Range("c" & rCount) = strColC
  xlSheet.Range("d" & rCount) = strColD
  xlSheet.Range("e" & rCount) = strColE
  xlSheet.Range("f" & rCount) = strColF

'Next row
  rCount = rCount + 1

 Next

     xlWB.Close 1
     If bXStarted Then
         xlApp.Quit
     End If
    
     Set olItem = Nothing
     Set obj = Nothing
     Set currentExplorer = Nothing
     Set xlApp = Nothing
     Set xlWB = Nothing
     Set xlSheet = Nothing
 End Sub


Envie seus comentários e sugestões e compartilhe este artigo!

brazilsalesforceeffectiveness@gmail.com

✔ Brazil SFE®✔ Brazil SFE®´s Facebook´s Profile  Google+   Author´s Professional Profile  ✔ Brazil SFE®´s Pinterest       ✔ Brazil SFE®´s Tweets
diHITT - Notícias