Forwarding from a view

I would like to select a group of documents from a view and forward them in an e-mail. You can do this with the system forward command but the only forward method is for a uidocument. I would like to do this in either formula or preferably lotusscript.

Thanks for your help in advance.

Subject: Forwarding from a view

King:

Try using the NotesUIView class. Start out by using the NotesUIWorkspace, access the UIView and then the selected UIDocuments/Documents from the UIView. You should be able to then use the “Forward” method.

HTH:

SPJ

Subject: Do you want to forward the documents, or links to the documents.

Hopefully links, since that is one of the best parts of Notes! Anyway, take a look at the NotesNewsletter class.

Subject: RE: Do you want to forward the documents, or links to the documents.

Here you go - remove the itemB references;Sub Click(Source As Button)

' this e-mails selected documents to names selected from an address dialog

Dim workspace As New NotesUIWorkspace

Dim uiView As NotesUIView

Dim collection As NotesDocumentCollection

Dim doc As Notesdocument

Dim Sendto1  As Variant	

' Dim item As NotesItem  'this is for send history

Dim ItemB As Notesitem ' get position field value for subject line

Set uiView = workspace.CurrentView

Set collection = uiView.Documents

Set doc = collection.GetFirstDocument	

If doc Is Nothing  Goto ErrorMessage

Sendto1 = workspace.Pickliststrings(PickList_Names)



While Not (doc Is Nothing)		

	Set itemB = doc.getfirstitem("Position")	

	doc.subject =  " A new form has been submitted for: " + ItemB.text	

	' start of sendto history code	

	' Set item = doc.getfirstitem("SendHistory")

	' If Not doc.hasitem(SendHistory) Then

		' Set item = New NotesItem(doc, "SendHistory", "")

	' Else

		' Set item = doc.getfirstitem("SendHistory")

	' End If

	' Call item.AppendToTextList( Sendto1)

	' Call doc.Save( False, True )

	' end of sendto history

	Call doc.Send(True, Sendto1)

	Set doc = collection.GetNextDocument(doc)	

	

	

Wend



Msgbox "Selected documents have been sent" 

Exit Sub	

ErrorMessage:

Msgbox " You have not selected any documents. Place a check mark next to a document to select it"

End Sub

Subject: RE: Do you want to forward the documents, or links to the documents.

Frank’s code worked. Thanks for all your help everybody!!!