|
-
Oct 26th, 2004, 12:52 AM
#1
Thread Starter
New Member
VB 6.0 Help
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
-
Oct 26th, 2004, 04:28 AM
#2
I am not sure if that is possible.. and only exe files hold those information (copyright and all that)...
-
Oct 26th, 2004, 05:18 AM
#3
Lively Member
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-
-
Oct 26th, 2004, 05:35 AM
#4
Thread Starter
New Member
Thanks Amrish
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.
-
Oct 26th, 2004, 10:03 AM
#5
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.
My usual boring signature: Nothing
 
-
Oct 27th, 2004, 01:00 AM
#6
Lively Member
Desaware.com
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)
-
Oct 27th, 2004, 01:18 AM
#7
I hope that it is at the request of the original author. Not sure that it'd be legal any other way!
-
Oct 27th, 2004, 03:11 AM
#8
Thread Starter
New Member
Thank you All
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
-
Oct 27th, 2004, 04:20 AM
#9
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
This world is not my home. I'm just passing through.
-
Oct 28th, 2004, 01:13 AM
#10
Thread Starter
New Member
Thanks trisuglow
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
-
Oct 28th, 2004, 01:43 AM
#11
have u set Project Reference to the Word Object Library.
Microsoft Word 9.0 object Library.
You may have different version.
-
Oct 28th, 2004, 03:46 AM
#12
Thread Starter
New Member
Thank you Very Much Deepak
Its works fine now
Thanks alot.
May God Bless you
Anil
-
Oct 29th, 2004, 02:55 AM
#13
Lively Member
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!
I didnt understand. The code posted by me is for the Excel Object.
Also in place of excel Anil you can reference the Word objects.
-amresh-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|