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
Hi Andrew, here is an example
Set Body = New NotesRichtextItem(BDoc,"Body")
Set OF = Body.EmbedObject(EMBED_ATTACHMENT,"","C:\AUTOEXEC.BAT")
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>...
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
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.