G
Guest
Hopefully someone can help. I am currently looking to convert my Excel VBA
procedure to .net 2005. If anyone can show me the code to go about this it
would be greatly appreciated. I have spent hours upon hours searching news
groups. I am trying to read/write custom file properties.
->Xp Pro
->Reference to the DSO dll in VBA
Sub AddProperty()
Dim DSO As DSOFile.OleDocumentProperties
Dim sFilename As String
Set DSO = New DSOFile.OleDocumentProperties
DSO.Open sFilename:="C:\Temp.pdf"
On Error Resume Next 'Errors if field is already created
DSO.CustomProperties.Add "REV", "Revision1"
On Error GoTo 0
DSO.CustomProperties.Item("REV").Value = "Revision1"
DSO.Save
DSO.Close
Set DSO=Nothing
End sub
procedure to .net 2005. If anyone can show me the code to go about this it
would be greatly appreciated. I have spent hours upon hours searching news
groups. I am trying to read/write custom file properties.
->Xp Pro
->Reference to the DSO dll in VBA
Sub AddProperty()
Dim DSO As DSOFile.OleDocumentProperties
Dim sFilename As String
Set DSO = New DSOFile.OleDocumentProperties
DSO.Open sFilename:="C:\Temp.pdf"
On Error Resume Next 'Errors if field is already created
DSO.CustomProperties.Add "REV", "Revision1"
On Error GoTo 0
DSO.CustomProperties.Item("REV").Value = "Revision1"
DSO.Save
DSO.Close
Set DSO=Nothing
End sub