my question is if anyone nows how to refresh modifed files in sharepoint so i dont have to wait to attach modified files.
I have an application that updates a worddocument on the users filesystem
and mail it as an attachment afterwards.
It works if the user choose a word file outside sharepoint.
The agent modifies and add values to the worddocument, saves it and mails the worddocument.
no problems.
If i choose a document in sharepoint the old worddokument is sent.
But when i check the file in sharepoint its modified correctly.
If i add a sleep for 30 sec after i save/checkin in the word document the new/updated worddocument is sent.
Ive tried solutions where ive opened the wordddoc again with lotusscript to see if it has been updated:
Set appWrd = Nothing
set appwrd = CreateObject(“Word.Application”)
Set docCurrent = Nothing
Set docCurrent = appWrd.Documents.Open(docPath)
endloop=“”
While endloop=“”
docCurrent.Bookmarks(“TelemMeddnr2”).Select
If(appWrd.Selection.Text = “” Or appWrd.Selection.Text = " ") Then
'not modified
Else
'modified
endloop="true"
End If
Wend
But everything is set when i check the above code but when i attach it with:
Call rtitem.EMBEDOBJECT(EMBED_ATTACHMENT, “”, files)
its empty.
the only thing that works right now is to wait 30 sec until i attach the modified documents from sharepoint.