ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   File, properties, title (https://www.excelbanter.com/excel-programming/329224-file-properties-title.html)

Eric[_29_]

File, properties, title
 
Can I (both read and) set the 'Title' attribute for a file using VBA ? Is it
possible ?

If not, are you aware of any alternative tools I might use ?

I need to open a file, search for a string in that file, get the value next
to that string then set the 'Title' attribute of the file to the value
found.

Thanks, Eric.



Bob Phillips[_7_]

File, properties, title
 
Use

activeworkbook.BuiltinDocumentProperties("Title")

--
HTH

Bob Phillips

"Eric" wrote in message
...
Can I (both read and) set the 'Title' attribute for a file using VBA ? Is

it
possible ?

If not, are you aware of any alternative tools I might use ?

I need to open a file, search for a string in that file, get the value

next
to that string then set the 'Title' attribute of the file to the value
found.

Thanks, Eric.





Eric[_29_]

File, properties, title
 
activeworkbook.BuiltinDocumentProperties("Title")

I understand this is read only, can it be written to ?

Regards, Eric.



Tom Ogilvy

File, properties, title
 
From the immediate window:

Activeworkbook.BuiltinDocumentProperties("Title"). Value = "Doghouse"
? Activeworkbook.BuiltinDocumentProperties("Title"). Value
Doghouse
Activeworkbook.BuiltinDocumentProperties("Title"). Value = "Thor"
? Activeworkbook.BuiltinDocumentProperties("Title"). Value
Thor

So looks like the answer is yes.

--
Regards,
Tom Ogilvy

"Eric" wrote in message
...
activeworkbook.BuiltinDocumentProperties("Title")

I understand this is read only, can it be written to ?

Regards, Eric.





Eric[_29_]

File, properties, title
 
Thanks to you both.

Eric.




All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com