Hi all
I m in a critical situation.I want a vb code to edit the author and company of files in a folder.
Hope a reply soon
Anil
Printable View
Hi all
I m in a critical situation.I want a vb code to edit the author and company of files in a folder.
Hope a reply soon
Anil
I am not sure if that is possible.. and only exe files hold those information (copyright and all that)...
Anil,
I found this in MSDN:
SpyWorks-VB -- is an advanced development tool for use with Visual Basic. The SpyWorks-VB package supports true owner-draw list boxes, in which you can draw each entry under program control in any manner that you wish. Desaware also has a custom control called "Storage Tools" that provides "OLE Structured Storage."
For example, you can use the control to access the summary information properties of office documents such as author, subject, title, comments, etc. Visit Desaware's website for more info:
www.desaware.com.
-Amresh Tripathi-
Thanks!
But the link you have given is not working
(www.desaware.com.).Can you please post the code will be highly appreciable
Anil Paul.
The link is not working, but you might google it.
However, the chances that a commercial software company would have source code that could be pasted onto a public forum on their website is negligible.
Here is the company's address as mentioned in MSDN
FarPoint Technologies, Inc., 585A Southlake Boulevard,
Southport Office Park Richmond, VA 23236
Sales/Info: (800) 645-5913 or (804) 378-0432
Tech Support: (804) 378-1011
FAX: (804) 378-1015
I agree with shaggy that they won't give you the source code easily. BTW what kind of documents are these for whom you want to edit the Author etc...
For eg I know how to set these properties for an Excel document generated using VB6.
Here you can use BuiltinDocumentProperties Property.
This property returns the entire collection of built-in document properties. Use the Item method to return a single member of the collection (a DocumentProperty object) by specifying either the name of the property or the collection index (as a number).
You can refer to document properties either by index value or by name. The following list shows the available built-in document property names:
Title
Subject
Author****************************
Keywords
Comments
Template
Last Author
Revision Number
Application Name
Last Print Date
Creation Date
Last Save Time
Total Editing Time
Number of Pages
Number of Words
Number of Characters
Security
Category
Format
Manager
Company ****************
Number of Bytes
Number of Lines
Number of Paragraphs
Number of Slides
Number of Notes
Number of Hidden Slides
Number of Multimedia Clips
Hyperlink Base
Number of Characters (with spaces)
I hope that it is at the request of the original author. Not sure that it'd be legal any other way!
Hello
What I need to do is there will be many msword doc files in a folder and what my boss want is he have to edit the author name and company name of those files
Please suggest
Thanks
Anil
This code works for VB6 SP5 and Word 2000. You will need to set a Project Reference to the Word Object Library.
VB Code:
Option Explicit Private Sub Form_Load() Dim wa As New Word.Application Dim wd As New Word.Document Dim dp As Object wa.Documents.Open "C:\Sample.doc" 'Use your own document here. Set wd = wa.Documents(1) Set dp = wd.BuiltInDocumentProperties dp("Author") = "new author - was " & dp("Author") dp("Company") = "new company - was " & dp("Company") wd.Close True End Sub
Hello
Thanks very much for the code.I am now downloading the SP5 of vb6 .Now on running it shows the error
User defined files not found!
I will try it after installing sp5.
Any way thanks for your help
Anil
have u set Project Reference to the Word Object Library.
Microsoft Word 9.0 object Library.
You may have different version.
Its works fine now
Thanks alot.
May God Bless you
Anil
I didnt understand. The code posted by me is for the Excel Object.Quote:
Originally posted by dglienna
I hope that it is at the request of the original author. Not sure that it'd be legal any other way!
Also in place of excel Anil you can reference the Word objects.
-amresh-