Icon images don't get right version

I’m working on a database designed in R7, but it needs to work in R6.5 environment as well, so I’m saving all the design elements with an R6.5 client so the end-user doesn’t see the pop-up “this design element has been modified by a later version of Notes …”

However, this technique is not working for images - even though I am refreshing the design of the images, they still come up with the warning. Any ideas???

Subject: RE: Icon images don’t get right version

I believe once you save with a higher version, it doesn’t get set back when you edit with a lower version. I don’t think that it should. You can use NotesNoteCollection to find all the image resources and adjust this item value if you don’t want to see the warning anymore.

Subject: RE: Icon images don’t get right version

Thanks for the response.

Question is why this only occurs for Images - my technique of opening and saving all other design elements does work.

Subject: RE: Icon images don’t get right version

(Ages later, but could be useful to others)

The code should be something like this:

Sub Initialize

Dim session As New NotesSession

Dim db As NotesDatabase

Set db = session.CurrentDatabase

REM Create note collection

Dim nc As NotesNoteCollection

Set nc = db.CreateNoteCollection(False)

nc.SelectImageResources = True

Call nc.BuildCollection



REM Modify the collection - take out test documents

nid = nc.GetFirstNoteId

For i = 1 To nc.Count

    'get the next note ID before removing any notes

	nextid = nc.GetNextNoteId(nid)

	Set doc = db.GetDocumentByID(nid)

	Call doc.ReplaceItemValue("$DesignerVersion","6.0")

	Call doc.Save(True,True)

	nid = nextid

Next	

End Sub

Greetings,

Martin Vereecken

http://www.bizzybee.be