Re: Creating a distribution list
- From: "Kerstin Schiebel" <k.schiebel@xxxxxx>
- Date: Tue, 19 Jul 2005 09:31:23 +0200
Hi Michael,
sorry for the late answer but my PC had some problems during the last days
:-(
First thank you very much for the hint.
Now I get always the Display Name "Outlook" instead of
Mustermann, E. (E.Mustermann@gmx)
A record in my text file looks like this:
E.Mustermann@xxxxxx; Mustermann, Elke (E.Mustermann@xxxxxx)
Do you have an idea?
Thanks
Kerstin
"Michael Bauer" <mib00@xxxxxxxxxxx> wrote in message
news:OrcMR4RiFHA.500@xxxxxxxxxxxxxxxxxxxxxxx
> Hi Kerstin,
>
> please use this syntax or adding the Recipient:
>
> myRecipients.Add "<" & Name & "> " & EMailAdr
>
> --
> Viele Gruesse / Best regards
> Michael Bauer - MVP Outlook
>
>
>
> Kerstin Schiebel wrote:
> > Hi,
> >
> > I use sometimes a little script for importing a text file for
> > creating a distribution list.
> > The syntax for the text file is email;name
> > I get a DL where the display name is always the email address. Now
> > emailaddress = display name
> > I want to change the script that the name is always imported into the
> > field "display name".
> > I would be very lucky, if someone could give me a hint.
> >
> > Thank you very much.
> > Kerstin
> > -----------------------
> > 'Öffnen der Datei
> > Set f = fs.GetFile(Dateiname)
> > Set ts = f.OpenAsTextStream(ForReading, TristateFalse)
> >
> >
> > 'The MailItem is required to create the Recipients collection
> > Set myMailItem = myOlApp.CreateItem(olMailItem)
> > Set myRecipients = myMailItem.Recipients
> >
> > I = 1
> > 'Lesen der einzelnen Datensätze und hinzufügen der EMail-Adressen
> > 'ASCII-Datei in der Form: emailadresse; Name
> > While ts.AtEndOfStream <> True
> > zeile = ts.ReadLine
> > Pos = InStr(1, zeile, ";")
> > If Pos > 0 Then
> > EMailAdr = Mid(zeile, 1, Pos - 1)
> > myRecipients.Add EMailAdr
> > Else
> > MsgBox "Fehler in " & zeile
> > End If
> > Wend
> >
> > 'Create the Distribution List item
> > Set myDistList = myFolder.Items.Add(olDistributionListItem)
> > myDistList.DLName = InputBox("Bitte geben Sie den Namen der Liste
> > ein: ", , "???")
> >
> > myDistList.AddMembers myRecipients
> > myDistList.Save
> > ---------------------
>
.
- Follow-Ups:
- Re: Creating a distribution list
- From: Michael Bauer
- Re: Creating a distribution list
- References:
- Creating a distribution list
- From: Kerstin Schiebel
- Re: Creating a distribution list
- From: Michael Bauer
- Creating a distribution list
- Prev by Date: Re: Macro to open a custom new message form
- Next by Date: Re: Suppressing reminders on Outlook startup
- Previous by thread: Re: Creating a distribution list
- Next by thread: Re: Creating a distribution list
- Index(es):
Relevant Pages
|