Re: Creating a distribution list



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
> > ---------------------
>


.



Relevant Pages

  • Re: Javascript form control element validation
    ... want to be able to display a popup window (callout?) when a text input ... is to display a "hint". ... So that when a user clicks in the username cell, they have a "hint" that gives them further info about the field, along with the opton to close the "hint". ...
    (comp.lang.javascript)
  • Re: Popup Hints in Treeview
    ... > You have to turn the TreeView.ShowHints off and generate and display ... > your own hint window in the TreeView OnMouseMove event handler ... ... TreeView: TTreeView; ...
    (comp.lang.pascal.delphi.misc)
  • Re: Does Psalm 110 really work for Big Industry?
    ... >> quoted from other questinable source, and he doesn't display even a ... >> hint of being able to think for himself. ... >> posts and rantings. ...
    (sci.energy.hydrogen)
  • [PATCH 1/3] UEAGLE : comestic
    ... hint about wrong cmv/dsp ... Display a message to warn user when the modem is ready: it can help people to detect problems on the line without debug trace ... display modem type (pots/isdn) ...
    (Linux-Kernel)