Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks

  

PreviousPrevious NextNext

RE: Can't set InternetAddress with @formula agent
Shawn W Taylor 11.Dec.06 09:38 AM a Web browser
Domino Designer 7.0.1 Windows XP


Fab,

here is the LS code I wrote. This is for hte PAB but can easily be modified for the nab.

Shawn

Sub setLocalNabMailAddress()

' Declare used variables
Dim session As New NotesSession
Dim pabDB As NotesDatabase
Dim pabDoc As NotesDocument
Dim pabColl As NotesDocumentCollection
Dim splitReturn As Variant
Dim userEmailAddress As String ' used to get existing address
Dim newEmailAddress As String ' used to set new address
Const domainName$ = "@yourdomain.org" ' new domain name

' set db options
Set pabDB = session.GetDatabase("", "names.nsf")
Set pabColl = pabDB.AllDocuments ' collect all documents in the address book DB
Set pabDoc = pabColl.GetFirstDocument ' grab the first doc from the address book

' loop through documents and put in new address - only looks for docs created with the "Location" form
While (Not(pabDoc Is Nothing))
' If (pabDoc.Form(0)="Location") And (pabDoc.Name(0) = "Office (Network)") Then ' make sure we are working with the Office profile document
If (pabDoc.Form(0) ="Location") Then ' make sure we are working with the Office profile document
userEmailAddress = Cstr(pabDoc.ImailAddress(0)) ' retrieve address from pab
If Not (userEmailAddress = "") Then ' Don't perform if field is blank
splitReturn = Split(userEmailAddress, "@") ' break up the users address
newEmailAddress = splitReturn(0) + domainName ' apend the new domain
Call pabDoc.ReplaceItemValue("ImailAddress", newEmailAddress) ' replace the address
Call pabDoc.Save( True, True ) ' save the record
End If
End If
Set pabDoc = pabColl.GetNextDocument(pabDoc) ' grab the next location
Wend
End Sub




Can't set InternetAddress with @for... (Fabrice Verrac 9.Dec.06)
. . RE: Can't set InternetAddress with ... (Shawn W Taylor 10.Dec.06)
. . RE: Can't set InternetAddress with ... (Shawn W Taylor 11.Dec.06)
. . . . RE: Can't set InternetAddress with ... (Fabrice Verrac 11.Dec.06)
. . . . . . RE: Can't set InternetAddress with ... (Shawn W Taylor 11.Dec.06)


Document Options






  Document options
Print this pagePrint this page

Search this forum

Forum views and search


  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Author
Category
Platform
Release
Advanced search

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Resources

 Resources
Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds

Wikis

 Wikis
IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums


 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite