Code snippet of, opening a file through Netoffice library.
Private m_Word As NetOffice.WordApi.Application = Nothing
Dim fi As New System.IO.FileInfo(TempTemplateFilePath)
If (fi.Length > 0) Then
oRet = m_Word.Documents.Open(TempTemplateFilePath)
After opening a document, I have a form in which we can set custom document properties like postpone merge.
Code snippet when we check some custom document property.
If (ReadDocumentProperty(cnt.Name) Is Nothing) Then
m_Properties.Add(cnt.Name, False, propType, oValue, Nothing) ' Berend .Net/982 'DWNET/1115-Sunny
m_Properties(cnt.Name).Value = oValue ' Berend .Net/982
In the above code snippet "m_Properties" is object of DocumentProperties
Private m_Properties As DocumentProperties
Custom document properties saved successfully, I have cross checked with Office 2007: Prepare-->Properties--> Document Properties--> Advanced Properties--> Custom tab
Now, I save and close the document without doing any changes in the open document. When I open the same document then the changes I made for document properties are not saved. This is because, Date modified is not updated.
Even after calling save() method still it is not updating the modified date. Is there way to modify the date, when we set document property for open document?
I don't want to fix this issue by adding space and immediately removing it.