Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Attaching documents with Lotus-script

265 views
Skip to first unread message

andrew

unread,
Oct 2, 1998, 3:00:00 AM10/2/98
to
Does anyone know an easy way automatically attach files to existing Notes
documents, presumably via lotus script.

I have tried doing this with @Commands but they can`t be run in an agent on
all documents.

I have seen plenty of examples for creating new files as objects but not
for attaching exisiting files.

Grateful for any ideas

Andrew Smeeton

Michael Altendorfer

unread,
Oct 5, 1998, 3:00:00 AM10/5/98
to

Hi Andrew, here is an example
Set Body = New NotesRichtextItem(BDoc,"Body")
Set OF = Body.EmbedObject(EMBED_ATTACHMENT,"","C:\AUTOEXEC.BAT")

Richard Ingle

unread,
Oct 7, 1998, 3:00:00 AM10/7/98
to

Andrew,

First you want to make sure that your document contains a rich text field.

Here is an example of some Lotus Script code that will attach a file in your
notes\data directory to a field called files.

dim session as NotesSession
dim doc as NotesDocument
dim db as NotesDatabase
dim rtItem as NotesRichTextItem

set session = new NotesSession
set db = session.CurrentDatabase

set doc = db.CreateDocument
set rtItem = doc.CreateRichtextItem("files")
call rtItem.EmbedObject(EMBED_ATTACHMENT, "", "d:\notes\data\file.txt", "The
Attached File")


'Note : d:\notes\data\file.txt is the name of the file you want to attach.
I just made this up
'Note2 : "The Attached File" is just a name used to reference it later. You
can use whatever you like
'Note 3: You can use the DIR function to recurse through directories on the
clients machine.

Hope this helps.
Richard


andrew wrote in message <01bdee5b$eed7da00$LocalHost@default>...

Steven Phelps

unread,
Nov 13, 1998, 3:00:00 AM11/13/98
to
Hi...

Does anyone know what this error message means and how I can get around it?
I've set the ACL wide open to everyone on the database I am performing DbColumn
on. Or is it a server setting?

HTTP Web Server: Lotus Notes Exception - For security reasons, remote Notes
database lookups are not permitted


Thanx!
-Steve
rnz...@yahoo.com


EdC

unread,
Nov 13, 1998, 3:00:00 AM11/13/98
to
Steven Phelps wrote:
>
> Hi...

>
> HTTP Web Server: Lotus Notes Exception - For security reasons, remote Notes
> database lookups are not permitted
>
> Thanx!
> -Steve
> rnz...@yahoo.com

Steve,

I'm going to guess you're trying to do a @DbColumn to a different
server. This is not allowed via HTTP. You can't even specify the
current server. You'll need to pull a local replica (if you don't
already have one) on the server running the HTTP task and specify NULL
for the server.

--
EdC CLP
e...@coakley.net
Contract Notes & Domino Application Development
http://www.coakley.net/edc/consulting
Please Note: When replying to mail please delete "NOSPAM." from the
reply address.

0 new messages