hcl-bot
1
Im using the COM lib to get some content out of databases.
Now I want to get the content of a word document which was created in a MS Office Library.
Im trying the following code (C#):
NotesSession ns = new NotesSessionClass();
ns.Initialize(“thepassword”);
NotesDbDirectory ndirs = ns.GetDbDirectory(ns.GetEnvironmentString(“Mailserver”, true));
NotesDatabase onedb = ndirs.GetFirstDatabase(Domino.DB_TYPES.DATABASE);
while (onedb != null)
{
onedb.Open();
if (onedb.Title == “Testdatabase”)
{
object[] allviews = (object[])onedb.Views;
foreach (NotesView oneview in allviews)
{
NotesDocument onedoc = oneview.GetFirstDocument();
So at this point I have a NotesDocument object which represents one of the MS Office documents which are stored in the MS Office Library database.
Now where in this object can I find the content of the document? Or the file which it represents? Any sample code?
Many thanks for any help.
hcl-bot
2
Subject: Get content of a document in a MS Office Library?
Use the NotesEmbeddedObject. If you look in the designer help file you should find some relevant examples
hcl-bot
3
Subject: RE: Get content of a document in a MS Office Library?
I looked in the help and also tried to use the EmbeddedObjects but I am stuck with this object:
If I use the NotesDocument object of the code I posted above I was trying:
NotesEmbeddedObject oneeo = (NotesEmbeddedObject)onedoc.EmbeddedObjects[0];
Now if I take a look at the name of the oneeo object I only get “OLEObject”.
I cannot use the ExtractFile method because it tells me that it can only be used for attachments.
The FileSize property tells me “0”.
The Object property is null.
In the Designer Help I only find samples that are reading the Name propertie and nothing else. I want to get the content or the file…
Any idea? Or perhaps a hint where to find the right examples in the help?