Great idea!!
This actually works. I use DIR to get the list of files. Then I can use
the extensions to get the right application. Then I use CreateObject and Set
to get to the appropriate application's Object Model for the file in
question.
A nearly perfect blend of WSH and VBA.
I am still having some problems with some non-Office filetypes, but the end
is in sight.
Thanks again.
--
Gary''s Student - gsnu200799
"urkec" wrote:
Quote:
> "Gary''s Student" wrote:
> Quote:
> > First, thanks for responding.
> > Second, let me apologize for my mis-leading query.
> >
> > Here is an manual example of what I want the script to do
> >
> > 1. I created a script called "search.vbs"
> > 2. the script contained the following two lines:
> >
> > Set wshshell = CreateObject("Shell.Application")
> > wshshell.findfiles
> >
> > 3. I opened the folder containing the file, right-clicked the file, selected
> > properties, selected the Summary tab, and entered this comment:
> >
> > "This script will bring up Windows Desktop Search"
> >
> > If I now mouse-over the icon, the comment pops up.
> > If I select Comments in the Details view of the folder, the comment is
> > displayed.
> >
> > The filetype, how I created it, or its contents are not important. I am
> > only concerned with the assignment of the comment. The assignment of the
> > comment was manual. I had to manually enter it thru Properties.
> >
> > I want to know if I can assign a comment to a file with a script ( the step
> > 3 part).
> >
> > b.t.w your previous assistance with my mapped drive problem worked very well!
> >
> >
> > --
> > Gary''s Student - gsnu2007xx
> >
> >
> > "Pegasus (MVP)" wrote:
> > Quote:
> > >
> > > "Gary''s Student" <GarysStudent@xxxxxx> wrote in message
> > > news:99A634DF-BB32-4992-A7C1-0FE1FD6E62C1@xxxxxx
> > > >I can manually assign a comment to a file (say a Word doc) by:
> > > >
> > > > 1. right-clicking the icon
> > > > 2. selecting properties
> > > > 3. selecting the Summary tab
> > > > 4. typing in the comment
> > > >
> > > > Can I do the same thing with a script??
> > > > --
> > > > Gary''s Student - gsnu2007xx
> > >
> > > An MS Word file is in essence a binary file composed of a
> > > mixture of text and binary code that controls how the text
> > > should appear on the screen.
> > >
> > > A VB Script file is a pure text file. There is no room for binary
> > > control code in it. However, you can add comments by inserting
> > > a single quote like so:
> > >
> > > wscript.echo "My Name is Gary" 'Console output
> > >
> > >
> > >
>
>
> If you have Word installed, you can use it's object model to acces
> Document.BuiltInDocumentProperties collection and assign a value to it's
> members.
>
>
> --
> urkec