|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
vb.net 2005 DSO equivalentprocedure 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 On Mon, 7 Aug 2006 18:58:01 -0700, MikeR <Mi***@discussions.microsoft.com> wrote:
¤ 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 There is no equivalent functionality for DSO in .NET. However, you can still use this library in a ..NET app (Project...Add Reference...COM). Paul ~~~~ Microsoft MVP (Visual Basic)
Unhandled Exception in Form Load in EXE but not in IDE
Speed in VB 2005 Get Application EXE name in VS.2005 Textbox LostFocus event fires after Command Button's OnClick event Strings Delay in making control visible when connecting to database Sending an e-mail on a wireless network Add to a user inputted date Where do i go to start learning VB.NET? VB Access to Excell |
|||||||||||||||||||||||