vbamania.pl
login:
hasło:
 
  *Rejestracja *Zapomniane hasło
 Dziś jest niedziela, 28 kwietnia 2024 roku.
Ustaw jako stronę startową Ulubione Napisz
PowrótPowrót do serwisu  RegulaminRegulamin rssRSS

  tytuł wątku:
Wątki dyskusji

outlook express


otwartyotwarty rozpoczął: sake13 postów: 9



napisał: admin
postów: 613


umieszczony:
9 sierpnia 2012
14:18

  
Cytat:
Prawidłowy kod (w tym przypadku kliknięcie przycisku) powinien wyglądać następująco (Visual Basic 2008 Express):

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'Definicja zmiennych
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String

iMsg = CreateObject("CDO.Message")
iConf = CreateObject("CDO.Configuration")

iConf.Load(-1) ' CDO Source Defaults
Flds = iConf.Fields
With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "nazwa.serwera.smtp"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'port serwera smtp
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "login do poczty"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "hasło do poczty"

.Update

End With

'Definicja treści wiadomości

strbody = Cześć" & vbNewLine & vbNewLine & _
"Linia 1" & vbNewLine & _
"Linia 2" & vbNewLine & _
"Linia 3" & vbNewLine & _
"Linia 4"

With iMsg

.Configuration = iConf
.To = "adres@odbiorcy.pl"
.CC = ""
.BCC = ""
.From = """Nazwa nadawcy"" <adres@nadawcy.pl>"
.Subject = "Temat wiadomości"
.TextBody = strbody
.Send() 'wysłanie wiadomości
End With

End Sub


Umieszczony przez Ciebie kod to NIE JEST VBA.
admin
napisał: ZielonyLudek
postów: 1


umieszczony:
7 sierpnia 2012
15:36

  
Prawidłowy kod (w tym przypadku kliknięcie przycisku) powinien wyglądać następująco (Visual Basic 2008 Express):

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'Definicja zmiennych
Dim iMsg As Object
Dim iConf As Object
Dim strbody As String

iMsg = CreateObject("CDO.Message")
iConf = CreateObject("CDO.Configuration")

iConf.Load(-1) ' CDO Source Defaults
Flds = iConf.Fields
With Flds

.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "nazwa.serwera.smtp"
.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'port serwera smtp
.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "login do poczty"
.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "hasło do poczty"

.Update

End With

'Definicja treści wiadomości

strbody = Cześć" & vbNewLine & vbNewLine & _
"Linia 1" & vbNewLine & _
"Linia 2" & vbNewLine & _
"Linia 3" & vbNewLine & _
"Linia 4"

With iMsg

.Configuration = iConf
.To = "adres@odbiorcy.pl"
.CC = ""
.BCC = ""
.From = """Nazwa nadawcy"" <adres@nadawcy.pl>"
.Subject = "Temat wiadomości"
.TextBody = strbody
.Send() 'wysłanie wiadomości
End With

End Sub
napisał: kabu
postów: 30


umieszczony:
6 października 2008
14:13

  
sprobuj tez uzupelnic nastepujace opcje-jesli wszystko jest dobrze powinienes wyslac maila


napisał: kilerus
postów: 15


umieszczony:
25 września 2008
15:02

  
Tak też robiłem:

Sub CDO_Mail_Small_Text()
    Dim iMsg As Object
    Dim iConf As Object
    Dim strbody As String
        Dim Flds As Variant

    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")

        iConf.Load -1    ' CDO Source Defaults
        Set Flds = iConf.Fields
        With Flds
            .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") _
                           = "poczta1.tfkable.pl"
            .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
            .Update
        End With

    strbody = "Hi there" & vbNewLine & vbNewLine & _
              "This is line 1" & vbNewLine & _
              "This is line 2" & vbNewLine & _
              "This is line 3" & vbNewLine & _
              "This is line 4"

    With iMsg
        Set .Configuration = iConf
        .To = "p.p@tfkable.pl"
        .CC = ""
        .BCC = ""
        .From = "p.p@tfkable.pl"
        .Subject = "Important message"
        .TextBody = strbody
        .Send
    End With

End Sub



Coś takiego?
Dalej mam komunikat:
"Nie powiodlo sie polaczenie warstwy transportu z serwerem"
napisał: kabu
postów: 30


umieszczony:
24 września 2008
10:22

  
Cytat:
If you read the information above you know that if you have a account in Outlook Express or
Windows Mail you can Run the code below after changing the mail address.
But if you not have a account in Outlook Express or Windows Mail you also need the commented
green lines in the code. Remove every ' before every green line and fill in the name of your SMTP server
where it says "Fill in your SMTP server here"


Przeczytales to dokladnie? Wypelnij tekst, ktory masz w komentarzach do konfiguracji cdo i powinno pojsc.
napisał: kilerus
postów: 15


umieszczony:
23 września 2008
15:17

edytowany:
23 września 2008
15:18

  
Mam tego Outloka Expressa i wrzucvam taki kod:


Sub CDO_Mail_Small_Text()
    Dim iMsg As Object
    Dim iConf As Object
    Dim strbody As String

    Set iMsg = CreateObject("CDO.Message")
    Set iConf = CreateObject("CDO.Configuration")


    strbody = "Hi there" & vbNewLine & vbNewLine & _
              "This is line 1" & vbNewLine & _
              "This is line 2" & vbNewLine & _
              "This is line 3" & vbNewLine & _
              "This is line 4"

    With iMsg
        Set .Configuration = iConf
        .To = "p.p@tfkable.pl"
        .CC = ""
        .BCC = ""
        .From = "p.p@tfkable.pl"
        .Subject = "Important message"
        .TextBody = strbody
        .Send
    End With

End Sub



Wyskakuje mi taki komunikat
http://fotoo.pl/hosting-zdjec/links/dsc1

Co jest nie tak????
napisał: LAnd
postów: 107


umieszczony:
29 czerwca 2007
05:48

edytowany:
29 czerwca 2007
06:01

  
Sending mail from Excel with CDO

to jest pod wskazanym niżej adresem

http://www.rondebruin.nl/cdo.htm

w wyszukiwarce znajdź

Mail_Small_Text_CDO

lub

CDO na stronach w języku polskim

CDO (Collaboration Data Objects) jest poniżej ale nie całkiem VBA

http://www.verio.com/support/documents/view_article.cfm?doc_id=3894
napisał: admin
postów: 613


umieszczony:
28 czerwca 2007
21:52

  
Cytat:
jak wymusić na makrze w excellu żeby dodało zalącznik do outlook expressa??


Do Outlook Expressa się nie da się. Bo Outlook Express nie ma wsparcia VBA, w ogóle prawie niczego nie ma.
Makra do niczego nie trza zmuszać, tylko je napisać bo od tego ono jest, by działało jak się je napisze dobrze, od tego ono jest.
Powtarzam: Makro należy napisać do MS Outlook, który to wchodzi w skład pakietu Office (nie we wszystkich wersjach!)

Może być MS Outlook?
napisał: sake13
postów: 23


umieszczony:
28 czerwca 2007
15:58

  
jak wymusić na makrze w excellu żeby dodało zalącznik do outlook expressa??


<-wstecz  1  dalej->
wszystkich stron: 1


Sortuj posty: z