Tuesday, July 24, 2007

DesignNoInitialInfobox

All Lotus Notes developers know that when we open the design's document of view or agent, the properties dialog is opening too. But I dont like this feature, really, I hate it. Actually why in views and agents only? why not in forms too?
To disable this properties dialog you should add variable to notes.ini DesignNoInitialInfobox=1 . try it and you like it :)

Monday, July 16, 2007

Microsoft Excel Worksheet (Embedded Object)

Today I did a simple task, but I never do it before. So, I had a simple form with Microsoft Excel Worksheet (Embedded Object). My task was to extract this embedded object from notes's documents to disk in folder. I had 2 problems:
- how I can choose a folder on my own PC from Lotus Notes client?
- how I can extract object as MS Excek file and save it in chosen folder?

the first task I solved by using undocumented method of NotesUIWorkspace: Let folderTo = w.prompt(14, "", "")

second task I solved by using next code:

If doc.HasEmbedded Then
Forall o In doc.EmbeddedObjects
Set handle = o.Activate(True)
If Not handle Is Nothing Then
Set exWb = handle.Application.ActiveWorkBook

'
Let VNumber = doc.GetItemValue("VNumber")(0)
Let Agreement_1 = doc.GetItemValue("Agreement_1")(0)
Let fileName = VNumber & SEP & Agreement_1 & ".xls"
'


On Error Resume Next
Call exWb.SaveAs(folderTo & fileName)
Print {Operate with file '} & folderTo & fileName & {'}
On Error Goto ERR_THIS
End If
End Forall
End If

Monday, June 18, 2007

Layer vs Dialog

Some days ago one my friend showed me nice approach for creating dialog, maybe it was nice only for me but I think many of Lotus Motes developers never thought about this approach before. As usual I used form/subform to create UI of my future dialog and then show it using @dialogbox or notesuiworkspace, but in this approach we lay layer onto our main form from which we will show a dialog. One of the main advantage of this approach is that we can change window in Lotus Notes during working in dialog.

Thursday, May 31, 2007

Thursday, May 24, 2007

Hot May

I do not remember when summer was so hot. I can't work. I can't walk. I can't do anything :). Sometimes I think that maybe it would be better if I lived in country like Canada :)