473,804 Members | 3,088 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to export your crap from Lotus Notes

Sub Initialize

Dim arrAttachmentNa mes As Variant

Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCo llection
Dim doc As NotesDocument
Dim attachment As NotesEmbeddedOb ject
Set db = session.Current Database
Set dc = db.AllDocuments
Set doc = dc.GetFirstDocu ment

CurrID = 100000
While Not doc Is Nothing

CurrIDStr = CurrID

Open "d:/export/records/"+CurrIDStr+".x ml" For Output As 1
Print #1, ""
Print #1, ""+CurrIDSt r+""

arrAttachmentNa mes = Evaluate("@Atta chmentNames", doc)
For n = 0 To Ubound( arrAttachmentNa mes )

If arrAttachmentNa mes(n) Like "*.*" Then

Set attachment = doc.GetAttachme nt(
arrAttachmentNa mes(n) )

fileName=CurrID Str+"-"+arrAttachment Names(n)
Print #1,""+fileName+ ""

Call
attachment.Extr actFile("d:/export/attachments/"+fileName)
End If
Next n

allFieldNames = Evaluate("@DocF ields", doc)
For k = 0 To Ubound( allFieldNames )

Print #1, ""
Print #1, ""
Print #1, allFieldNames(k )
Print #1, ""
Print #1, ""

If Not Isempty(doc.Get ItemValue(allFi eldNames(k))) Then
something = doc.GetItemValu e(allFieldNames (k))(0)
Print #1, something
End If

Print #1, ""
Print #1, ""

Next k

Print #1, ""
Close #1

Set doc = dc.GetNextDocum ent( doc )
CurrID = CurrID + 1
Wend

End Sub

Jul 17 '05 #1
4 2929
Are you sure you posted in the right group?

Regards,
Erwin Moller
Jul 17 '05 #2
absolutely

Jul 17 '05 #3
On 8 Feb 2005 09:05:07 -0800, gu******@yahoo. com wrote:
Dim session As New NotesSession


Ah, Notes, the black hole for data. Similar code using the same COM interface
works OK from Perl, using Win32::OLE, and making it somewhat more useful than
Visual Basic.

Bit of a shame the PHP Lotus Notes functions (http://uk2.php.net/notes) are
pretty much dead.

--
Andy Hassall / <an**@andyh.co. uk> / <http://www.andyh.co.uk >
<http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4
That's the init method for a LotusScript Agent ;-)

That's where you dump the code to get your database out. Thought I'd
place in the google code repository for future generations to find to
do this task without having to make a career out of it. And in the PHP
group is where they'd find it.

Then put the data in one of those PHP CMS/groupware thingys. In the
underlying database rather. Databases are good at backups and
replication and export, storing data, and stuff like that ;-)

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
5021
by: NickBlooruk | last post by:
Hello, I have successfully linked a Lotus Notes server to our SQL Server database using an ODBC connection. This works fine when wanting to select records eg openquery(LOTUSNOTES2, 'select * from Person' ) The problem I have is when I try to update the record I get an error eg update openquery(LOTUSNOTES, 'select * from Person where
10
4246
by: hrishy | last post by:
Hi I have heard rumors that Lotus notes would be moving to db2 as the datastore..would that mean db2 for windows and Linux have a shot in its arm and become as pervasive as oracle and ms-sql server.. would appreciate your thoughts on this.. regards Hrishy
5
7395
by: Colin Anderson | last post by:
I discovered, with great excitement, this article http://www.davison.uk.net/vb2notes.asp when researching methods for emailing from Access via Notes. Unfortunatly, when I run this I get a Run-time error. When I run it on an XP machine it crashes, but on an NT box it just generates an unknown error, handled by the error handler. I have debugged and stepped through the code and have narrowed the issue to the point at which the...
0
5617
by: PZ Fosbeck | last post by:
I'm not a Lotus Notes developer but thanks to this group's archives have successfully created a function for sending Lotus Notes emails from Access. The follow code works great except I want to remove my name from the 'Sent By' portion of the email. These messages are sent using my client session of Lotus Notes, using a database called 'Tech Team' The resulting email message headers contains (Bold, the From name) 'Tech Team'
0
1501
by: Heinz K | last post by:
Hi all, is it possible to access a Lotus Notes database even if Lotus Notes is not installed on current computer? I have an IIS and want to create a Webservice which accesses data from a Lotus Notes Server. I found solutions if Lotus Notes is installed locally, but on my IIS Notes is not and will not be installed. Is it nevertheless possible to read data from the database? Thanks!
1
13051
by: Joe | last post by:
HI Has anyone been able to work with lotus notes automation classes??? Can you post sample code of how to use these classes. I have setup in VB but I am not able to port to C# This is what I have so far - I cannot create a session and not sure how to setup From/Subject
3
8278
by: =?Utf-8?B?SmFtZXNU?= | last post by:
I can create a message and send it via my btopenworld account but is the method the same when using Lotus Notes. I have no experience of Lotus Notes whatsoever. I have never seen it at all. the code I am using is: dim smtp as new smtpclient dim message as new mailmessage( from@cc.com, to@dd.com) message.subject = "test"
0
1798
by: kohligagan2 | last post by:
Hi, I am working on a scenario . And scenario is I am trying to send an Email using my Lotus notes Client Id ( Lotus notes :- is used for messaging and sending mails work as a middleware) I have an ASP .NET website running on a IIS Server with Lotus note is running at the machine where server is running. One client sends the request to the server and correspondingly mail goes to the respective person as mentioned. I am using a...
2
3976
by: MarkStorer | last post by:
Hi All I need to email a report (with contains graphs) via Lotus Notes. I've tried the 'SendObjectSnp' method (which works with some Lotus Notes clients (but not many others)); so I used the code below: - Public Sub SEND_EMAILS() Dim session As Object Dim db As Object Dim doc As Object Dim rtitem As Object
0
10564
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10073
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7609
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6846
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5513
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5645
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3806
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2981
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.