Subject: RE: Export current view to VBA Excel
Thanks Jhon.
I didn’t know the Sandbox, I googled it and I found it. That’s great, I will find a lot of stuff there.
I checked some examples, but they do what I was trying to do. They do it this way:
Set vw = ses.currentview
Set coldocs = vw.documents
Set doc = coldocs.getfirstdocument
…
Set doc = coldocs.GetNextDocument(doc)
I already did try this, but it exports all the view documents, including the hidden ones.
Instead if I open the view, then expand/compress some items, then i export it in csv format, I only get the view as I see it, with the compressed headers and the expanded data, without the hidden data (compressed nodes).
Another example uses the CreateViewNav. If I understand how it works also this is not good for me, because it is a method of NotesView and not of NOTESUIVIEW, and if I understand the only way to access what the user is doing is to use the NOTESUIVIEW.
Correct?
Another point: I need this macro to run into Excel because this import is the first step of a much longer job. I know very well VBA and Excel, but this is the first time I use Lotus via COM.
I think the start point should be this:
Dim workspace As NOTESUIWORKSPACE
Dim uiview As NOTESUIVIEW
Set workspace = CreateObject(“Notes.NotesUIWorkspace”)
Set uiview = workspace.CURRENTVIEW
but the early binding doesn’t work. I added dombj.tlb and notes32.tlb as references, I see them in the object browser, but if I run I get a “Type mismatch” error.
If I declare the variables as variants or objects then it works.
Thanks,
Stefano