Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tom has included some code already, but FYI, the VB files are just text
really, so you can copy/paste into VBA, with a few alterations. NickHK "VBA Dabbler" wrote in message ... Thanks for the reply, Tom. I've downloaded the DLL - it looks like you have to be in an application development environment, like C++, VB, etc. I'm not sure how this can be used in Visual Basic for Applications (VBA). Am I missing something? Regards, VBA Dabbler "Tom Ogilvy" wrote: MS provides a DLL to support this. Unfortunately this article has been updated to reflect .Net, but the DLL should still work from VBA i would think http://support.microsoft.com/default...b;en-us;224351 Here is some information I posted in 1999 =============== Leo, I think you are trying too hard. In Excel97, I went into the VBE and into Tools=References and created a reference to the DSOFile.dll using the browser. Then the following code worked fine: Sub TestDSOFILE() Dim docProp As DSOleFile.DocumentProperties Set docProp = PropertyReader.GetDocumentProperties( _ sFilename:="Y:\docs\Excel_quit.xls") Debug.Print docProp.AppName Debug.Print docProp.Author Debug.Print docProp.Name End Sub It returned the following Microsoft Excel Thomas W. Ogilvy Excel_quit.xls Once you have the reference, you can use the object browser to see what other properties are available. HTH, Tom Ogilvy =============== Of course it needs to be registered with regsvr32 in code Shell "RegSvr32 ""C:\Winnt\system32\DSOFILE.dll"" /s " depending on where you placed the file. if you are willing to open it: http://www.cpearson.com/excel/docprop.htm at Chip Pearson's site. -- Regards, Tom Ogilvy "VBA Dabbler" <VBA wrote in message ... Does anyone know the VBA code to add or change a 'CustomDocumentProperty' in an Office document at the file level without opening the document? Assume that the VBA code will be running in an Excel workbook. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Prevent formula from changing when adding in cells | Excel Discussion (Misc queries) | |||
Adding Numbers and Changing colors | Excel Worksheet Functions | |||
changing datas when adding row ? | Excel Worksheet Functions | |||
CustomDocumentProperties | Excel Programming | |||
adding changing number of days | Excel Programming |