![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Assign a Comment 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 |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Assign a Comment "Gary''s Student" <GarysStudent@xxxxxx> wrote in message news:99A634DF-BB32-4992-A7C1-0FE1FD6E62C1@xxxxxx Quote: >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 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 |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Assign a Comment 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 Quote: > >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 > > > |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Assign a Comment "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 Quote: > > >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 |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Assign a Comment "Gary''s Student" <GarysStudent@xxxxxx> wrote in message news:F3E988CA-3708-4ADF-9B74-42812F79CDE9@xxxxxx .... Quote: > 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). Pearson has some typically thorough code (much of it specifically designed for XL workbooks) for download at http://www.cpearson.com/excel/DocProp.aspx I'm not sure, but I think that any file type that has a Summary tab on its Properties sheet in Explorer can have its properties read and written using dsofile.dll. -- Noel |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Assign a Comment 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 |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Assign a Comment Thank you very much. i am going to experiment with this tomorrow. It looks like I may be able to set the comment without even opening the file. -- Gary''s Student - gsnu2007xx "Ildhund" wrote: Quote: > "Gary''s Student" <GarysStudent@xxxxxx> wrote in > message news:F3E988CA-3708-4ADF-9B74-42812F79CDE9@xxxxxx > .... Quote: > > 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). > You want dsofile: see http://support.microsoft.com/kb/224351. Chip > Pearson has some typically thorough code (much of it specifically > designed for XL workbooks) for download at > http://www.cpearson.com/excel/DocProp.aspx > > I'm not sure, but I think that any file type that has a Summary tab > on its Properties sheet in Explorer can have its properties read and > written using dsofile.dll. > -- > Noel > > |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Can't assign default program | Vista General | |||
| Assign user files | Vista account administration | |||
| Assign playback to WMP | Vista music pictures video | |||
| How assign extension to app? | Vista General | |||
| Cannot assign drive letter | Vista installation & setup | |||