Excel VBA/COM Excel import to Lotus Notes

Hi,What I am trying to do is, I have a ‘Range’ (whateve this is !!) in Excel, and I need to put this ‘Range’ from Excel into a Lotus Notes document.

The IDEAL would be, if it did it exactly like it does when you press Edit - Paste Special and select “Rich Text” in Lotus Notes.

Then it would look nice! But I’m willing to consider other ideas as this doesn’t seem to be working.

I can finally connect my Excel to Lotus Notes, through the backend:

Dim domSession As Object

Set domSession = CreateObject(“Lotus.NotesSession”)

Dim domDatabase As Object

Dim domDocument As Object

Dim domViewEntry As Object

Dim domView As Object

Dim domViewNav As Object

Dim domUIDocument As Object

Dim strName As String

Dim DesignField As Object

domSession.Initialize

Set domDatabase = domSession.GETDATABASE(“CC-Server/CC_Region/Company/CC”, “Folder\DatabaseName.nsf”)

Set domView = domDatabase.GETVIEW(“VIEWNAME”)

Set domDocument = domView.GETDOCUMENTBYKEY(“DOCUMENTKEY”)

Set DesignField = domDocument.GETFIRSTITEM(“design_system_changes”)

I can append text to the relevant field using:

Call DesignField.APPENDTEXT(“TextToAppend”)

Call domDocument.Save(False, False)

I can get values from the document using:

strName = domDocument.GETITEMVALUE(“FieldName”)(0)

MsgBox strName

However:

I have a Range in Excel (I can copy if if required) like this:

Range(“B1”, ActiveSheet.Range(“B1”).End(xlDown).Resize(Selection.Rows.Count + 0, Selection.Columns.Count + 7)).Select

If I need to copy I can use:

Selection.Copy

I’d prefer not to use UI methods, as it’s messy, and some documents I looked at seemed to imply, unsupported (though others seemed to think it was OK).

Is there a way to put my range into my Field ?

Even if it means going through each cell in my range?

The only way I found to access a value is by using ActiveCell, but then I can only access 1 cell?

This worked something like this:

Application.Range(“B1”, ActiveSheet.Range(“B1”).End(xlDown).Resize(Selection.Rows.Count + 0, Selection.Columns.Count + 7)).Select

With Application.Selection

getValue1 = Application.ActiveCell.Value

End With

But of course then I can only get the ActiveCell, not all Cells in the range?

If we have to go through each cell perhaps, there is a way of creating a table in the Lotus Notes document to populate each line of text in?

Thanks very much, I’m sorry if it’s a silly question, I’m a little rusty with this sort of thing, I did have a look around but did not find a suitable answer as yet!

If someone only knows how to get ALL the values out of my ‘Range’ then that would at least be a start?