populate Keywords with a batch file?

I'd like to know how to create a batch file that can store a key word 
(including a trailing comma).  I'd open an appropriate word.doc, run the 
batch file, and that keyword and comma would be inserted in the Keywords 
panel, either preceding any existing keywords there, or appended to any 
existing keywords there.

So if I had multiple batch files, each embedded with their own unique 
keyword and comma, I could invoke certain ones as desired, one after another, 
 progressively populating my document's keywords panel with multiple keywords 
all strung together with comma delimiters.

If I individually compiled those batch files into .exe files, then I could 
give each .exe its own name (consisting of the key word embedded in it). Then 
I could create a hierarchical, multi-level topical folder structure within My 
Documents, and store all my desired key word exe files, according to topic, 
in those various folders.

Then I could set my Start Menu to "Expand My Documents".

Now I could open any .doc, use the Start menu to cruise effortlessly through 
the maze of topical, hierarchical menus, arrive at any desired key word, 
release the mouse, and populate the keyword panel of the open Word.doc.  I 
could do this, repetitively, to store numerous key words in that document.

I could then share that hierarchical menu structure with our workgroup, so 
everyone could use their Start Menus to embed documents with our standardized 
set of keywords, without having to do any typing (nor making any typos).

Finally, I could PDF all those Word.docs and index them using Acrobat Pro. 
Since Acrobat 'sees' and indexes microsoft word document key words, it would 
allow us to employ Acrobat's extremely robust  indexed search engine to find 
documents based not only on full text search, but also on our embedded  key 
words.

I could do all this, using nothing more than Windows' Start Menu, NotePad 
(for editing the batch file), and a simple batch file-to-.exe compiler.

Just thinking outside of the box....
0
Utf
12/22/2009 11:28:02 PM
word.vba.general 1023 articles. 1 followers. Follow

3 Replies
1270 Views

Similar Articles

[PageSpeed] 2

I am not sure that I would refer to them as batch files, but the code that 
you need is:

With ActiveDocument
    If .BuiltInDocumentProperties(wdPropertyKeywords) = "" Then
        .BuiltInDocumentProperties(wdPropertyKeywords) = "This, is, another, 
crazy, idea"
    Else
        .BuiltInDocumentProperties(wdPropertyKeywords) = 
..BuiltInDocumentProperties(wdPropertyKeywords) & ", This, is, another, 
crazy, idea"
    End If
End With


-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Rob Benz" <RobBenz@discussions.microsoft.com> wrote in message 
news:964C87CA-1CE0-4E4C-AE83-3CA85CF0C914@microsoft.com...
> I'd like to know how to create a batch file that can store a key word
> (including a trailing comma).  I'd open an appropriate word.doc, run the
> batch file, and that keyword and comma would be inserted in the Keywords
> panel, either preceding any existing keywords there, or appended to any
> existing keywords there.
>
> So if I had multiple batch files, each embedded with their own unique
> keyword and comma, I could invoke certain ones as desired, one after 
> another,
> progressively populating my document's keywords panel with multiple 
> keywords
> all strung together with comma delimiters.
>
> If I individually compiled those batch files into .exe files, then I could
> give each .exe its own name (consisting of the key word embedded in it). 
> Then
> I could create a hierarchical, multi-level topical folder structure within 
> My
> Documents, and store all my desired key word exe files, according to 
> topic,
> in those various folders.
>
> Then I could set my Start Menu to "Expand My Documents".
>
> Now I could open any .doc, use the Start menu to cruise effortlessly 
> through
> the maze of topical, hierarchical menus, arrive at any desired key word,
> release the mouse, and populate the keyword panel of the open Word.doc.  I
> could do this, repetitively, to store numerous key words in that document.
>
> I could then share that hierarchical menu structure with our workgroup, so
> everyone could use their Start Menus to embed documents with our 
> standardized
> set of keywords, without having to do any typing (nor making any typos).
>
> Finally, I could PDF all those Word.docs and index them using Acrobat Pro.
> Since Acrobat 'sees' and indexes microsoft word document key words, it 
> would
> allow us to employ Acrobat's extremely robust  indexed search engine to 
> find
> documents based not only on full text search, but also on our embedded 
> key
> words.
>
> I could do all this, using nothing more than Windows' Start Menu, NotePad
> (for editing the batch file), and a simple batch file-to-.exe compiler.
>
> Just thinking outside of the box.... 

0
Doug
12/23/2009 6:02:32 AM
I sure would not refer to them as batch files either.  If you are going to be
opening and actioning instructions (as inserting Keywords in a Word document
is) on Word documents, you will need an instance of Word.

So how exactly are these batch files?  And how exactly are you going to
compile them into .exe that will use an instance of Word?

Doug Robbins - Word MVP wrote:
>I am not sure that I would refer to them as batch files, but the code that 
>you need is:
>
>With ActiveDocument
>    If .BuiltInDocumentProperties(wdPropertyKeywords) = "" Then
>        .BuiltInDocumentProperties(wdPropertyKeywords) = "This, is, another, 
>crazy, idea"
>    Else
>        .BuiltInDocumentProperties(wdPropertyKeywords) = 
>.BuiltInDocumentProperties(wdPropertyKeywords) & ", This, is, another, 
>crazy, idea"
>    End If
>End With
>
>> I'd like to know how to create a batch file that can store a key word
>> (including a trailing comma).  I'd open an appropriate word.doc, run the
>[quoted text clipped - 44 lines]
>>
>> Just thinking outside of the box....

-- 
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/word-programming/200912/1

0
Fumei2
12/29/2009 7:49:42 PM
Are you going to use DSOfile?

Fumei2 wrote:
>I sure would not refer to them as batch files either.  If you are going to be
>opening and actioning instructions (as inserting Keywords in a Word document
>is) on Word documents, you will need an instance of Word.
>
>So how exactly are these batch files?  And how exactly are you going to
>compile them into .exe that will use an instance of Word?
>
>>I am not sure that I would refer to them as batch files, but the code that 
>>you need is:
>[quoted text clipped - 15 lines]
>>>
>>> Just thinking outside of the box....

-- 
Message posted via http://www.officekb.com

0
Fumei2
12/29/2009 7:51:43 PM
Reply:

Similar Artilces:

merging .pub files
I have created 2 .pub files using Publisher 2003, a 50 page directory file and a 4 page calendar file. I want to append the calandar file onto the end of the directory file but can't find any method of combining pre-created ..pub files. I assume there is a method, but as a rookie, can't find it. I also have Publisher 2007 available, if it would work better. Any assistance is appreciated. Bruce H Bruce H wrote: > I have created 2 .pub files using Publisher 2003, a 50 page directory file > and a 4 page calendar file. I want to append the calandar file onto the end >...

Additional file with no extension created during File Save As proc
Good morning all! I originally posted this query on the Developer board, as I thought it was a problem with my code, but now I'm not so sure. I have a workbook with a macro that runs a Save As within a loop, to create test data files. I was finding that for every new file I created, and additional file with a filename comprisiong eight alphanumeric characters and no file extenson was created in the same folder. Thinking that the workbook might be corrupted, I created a new workbook (with NO copying/pasting from the original - everything types in from scratch) , created new code m...

Converting money file #2
I have installed GnuCash. Can I use Microsoft Money data with it? Ask GnuCash? -- Regards Bob Peel, Microsoft MVP - Money For unofficial FAQs see http://money.mvps.org/ or http://umpmfaq.info/ I do not respond to any emails that I have not specifically asked for. "abc" <abc@discussions.microsoft.com> wrote in message news:B649AC52-FEDE-4B71-8E69-23299B71BB89@microsoft.com... >I have installed GnuCash. Can I use Microsoft Money data with it? GnuCash imports QIF. Money exports QIF. Assuming GnuCash does sane things with the iimports, that'd be better than nothi...

FILE SIZES/CANNOT SAVE
Hi there ! I have an excel spreadsheet with 8 wsheets which worked perfectly , and was 180k in size. However , as I REMOVE wsheets the file size INCREASES! When I leave just 3 Wsheets , each EMPTY! , the file size has quadrupled to 750K ! .. and I am unable to save/overwrite it on a floppy ! Has anyone any ideas ? ... Many thanks .... Brian NEVER save to a floppy. SAVE and COPY to the floppy. Same thing on getting file FROM floppy. Copy to HD. Then open. -- Don Guillett SalesAid Software donaldb@281.com "BRIAN BARNARD" <brian.barnard80@ntlworld.com> wrote in ...

Maximum file size for CFile?
Hi, I was under the impression that the maximum file size for a CFile object was 2Gb. Is this information superceded? Only I created a test app using CFile and appear to be able to: 1) Create a file 5Gb or greater using CFile::SetLength() 2) Seek to position (say) 4000 * 1024 * 1024 (=4Gb) 3) Write some bytes to this position 4) Read them back and compare with what should have been written. The seek at (2) seems to take a long time though. I'm running WinXP Pro, SP1, Visual Studio .Net 2003. Any illumination gratefully received! Is the answer the same for Win2000 forward? Was the ...

How do I save an Excel file in ASCII?
Mrs Crinkle wrote: Save as *.csv > How do I save an Excel file in ASCII? One way... To save formulas and values, use: Tools >> Options >> View and check "Formulas" Then: File >> Save as and choose CSV as the "Save as type" Many Excel features aren't preserved, but you'll get the basic values and formulas for one worksheet. ...

Find the most recent record in a file
I'm using Access2003 and this is what I'm trying to do. I have a Table with 3 fields: [Date of Activity] [Person Performing Activity] [Type of Activity] I want to write a query so I can list the Date of the most recent Activity, for each Type of Activity, and have it print on a Report. I'm going to run this report daily, and want to list one record for each "Type of Activity" and show the most recent date that activity was performed, and the person who performed it. Any help would be appreciated. create a query with type of activity grouped and date of ac...

Forgot my PST File Password
Hello: I have Outlook 2003 and I put the password on my PST file, but now I can't remember it. Is there any way I can recover the password? Thanks in advance, Spuddy Spudy wrote: > Hello: > > I have Outlook 2003 and I put the password on my PST file, but now I > can't remember it. Is there any way I can recover the password? > > Thanks in advance, > Spuddy Google is your friend - many PST password-crackers out there.... Gordon <gbplinux@gmail.com.invalid> wrote: > Google is your friend - many PST password-crackers out there.... But none I've s...

Excel 2007 painfully slow to open files
Having upgraded to Office 2007 (XP Pro, 1 Gb RAM Pentium 4 2.4GHz) I am finding Excel to be painfully slow even when opening small (50k) files by double clicking either the file or a shortcut. If I have Excel open and go through the ribbon menu to open the file from within Excel it opens immediately - it is only slow when opening a file via shortcut or double clicking the file with Excel closed. Is there a fix for this? Wowbagger wrote: > Having upgraded to Office 2007 (XP Pro, 1 Gb RAM Pentium 4 2.4GHz) I am > finding Excel to be painfully slow even when opening small (50k) f...

Tutorial On Using Windows Vista Compressed Files Capabilities
Where can I find a link or tutorial on using Windows Vista's Compressed Files Capabilities? I am of need to create several Zipped Compressed Files. I am not interested in third party software. Thank you Eddy. Very simple - Right click the file ( or Files ) and from the context menu place your pointer over "Send To". From the secondary menu choose "Compressed (Zipped) File". "Eddy" <Eddy@discussions.microsoft.com> wrote in message news:7E75733F-4757-4253-9277-BC15273789C7@microsoft.com... > Where can I find a link or tutorial on usi...

Excel 2008 cannot open xlsx and xlsb files created by Excel 2007 for PC
Just today (17 January 2008), I installed Office 2008 on my Mac and discovered a major incompatibility: Excel files, moderate in size or larger (e.g., 2 Mb) created in Excel 2007 for PC and saved in xlsx and xlsb formats cannot be opened by Excel 2008 for Mac. <br><br>I just spent an hour on the phone with technical support at Microsoft. While talking to the support person there, I sent to him three such files, and he and his collegues were unable to open any of them in Excel 2008. <br><br>If you try to open such a file in Excel 2008, the latter seems to "hang&qu...

Importing Excel file without server access
I'm automating the process of emailing query results as an Excel file attachment to one recipeint. The recipient will complete data in the Excel file. My problem is that our company will not give this person access to our server, therefore he cannot upload his updated Excel file to one of our drives where I can then access it, import and update my table. There is nobody that he can email the file to either. I believe, however, that he'll have access to unpload a file to our company's SIFT site. Is there a way, through automation, that I can then import the file from ...

Problem opening office xp excel files
Hi all, I have office xp and when I click on an excel file, Excel will run bu it doesn't open the file, it leaves it empty and gray. Problem goe away if I do file, open, filename. Can anybody help? This problem happens to all my excel files, not just a particular one Thanks ----------------------------------------------- ~~ Message posted from http://www.ExcelTip.com ~~View and post usenet messages directly from http://www.ExcelForum.com Try Tools / Options / General / If 'Ignore other Applications' is checked then uncheck it. -- Regards Ken..........................

deleting the dynamics.dic file on the server
Hello: Someone at a client of ours went in and somehow managed to accidentally delete the dynamics.dic file from the server’s GP code folder. Now, GP will of course not run on the server. The client tried to alleviate this issue by copying the dynamics.dic file and dex.ini file from a working workstation. That did not work. They still get errors on the server whenever someone tries to launch GP from the server (Visual Basic initialization failure, ".tlb files are missing", outdated versions of OLE system files are present, etc.) The client does not have a backup of this c...

Excel Image not displayed when the physical file is N/A
Hello there, I'm having a problem on images that's generated from excel. I'm using the url method to generate the excel file and I'm aware that the images are stored in a physical location and the images won't be able to be displayed if the physical file is not available. I'm able to display the images out when the excel report is generated; however, when we save it as the default xls extension file, and open it in another location, the images are not displayed, as only the physical file path is being stored in the excel file. I've tested it on a c...

Excel opening with Visual Basiic File not Found Error?? Help!!!
When I open up Excel I am receiving an error message "Microsoft Visual Basic File not Found" when I hit help it tells me it is file not found error 53. Can anyone provide me some information on how I need to fix this problem. Help!!!! Thanks, Judd Hi Judd, See responses to similar questions from Tom Ogilvy http://tinyurl.com/9nubf and Dave Peterson: http://tinyurl.com/829pc --- Regards, Norman "jbsand1001" <jbsand1001@discussions.microsoft.com> wrote in message news:A6EAD2E6-E90E-4929-9368-0C96BCADC374@microsoft.com... > When I open up Exce...

Word Automation
Bug Report (can't find out how to submit bug reports other than here) Summary of bug - Word 2007 automation object throws error 5174 with any filename that has the pound sign (#). I have run into this bug only when using the Automation object for Microsoft Word 2007. I have not tried this with other versions of Word. The file I am opening is a "doc" file, NOT a "docx" or "docm". The filename contains a pound sign (#). I am able to open this file using any other method (File->Open; double-clicking from Windows Explorer; etc). But when opening ...

Populate textbox form selection on combo box
Hi I am new to code I have a query that a unbound combo box is bassed on. The 4th colunm is the Ingredient ID that I would like to write to textbox Ingredient_Id I have tried Tom Lake's sugestion Private Sub Combo12_AfterUpdate() Me![Ingredient_Id] = Me![Combo12].Column3 End Sub But I get Object doesn't support this porperty or method, and I do not understand what it means. What does the "me" mean? Thank you Esrei "Me!" refers to the form in which the code is being written and I don't think it is really necessary. I think it should be: ...

How to properly transfer an outlook.pst file?
For years I have struggled with "transferring" Outlook's .pst file, e.g., when doing a complete re-install of Windows or when a client buys a new PC and wants their Outlook data transferred from their backup files. Invariably something gets botched up and this usually means I have to spend hours trying to resolve the mess created. I am assuming there must be a proper way to do this and obviously I'm not doing it. What I'm hoping for is that someone will provide a step-by-step procedure that WORKS. My general practice has been to install Office, open Outlook and cre...

Make ZIP files from ASP.NET with VB
Hi somebody have an example or an idea to how to make ZIP files from a folder? Thanks a lot On 9/17/2010 2:14 PM, Marcos G. wrote: > Hi somebody have an example or an idea to how to make ZIP files from a > folder? > > Thanks a lot <http://www.google.com/#sclient=psy&hl=en&site=&source=hp&q=zip+libaries+for+net&btnG=Google+Search&aq=f&aqi=m1&aql=&oq=zip+libaries+for+net&gs_rfai=CsSyRB82TTOGbJJG6hASEv7n2CwAAAKoEBU_QB9Oo&psj=1&fp=207a1c3c62b92b94> Have a look on codeplex (http://www.codeplex.com) - there are severa...

outlook freezes attaching files
Outlook freezes when users try to attach files stored on a network drive. Only some users have this problem, if I do the same with a different login it work just fine. Any ideas.....?? ...

Looking for Microsoft Office Binary File Format or File Signature data
I have an application which obtains numerous "unidentifiable" files with no file extension, via FTP, and would like to run some sort of binary filter on it to identify PPT, DOC, XLS file formats. I did fine this: http://www.garykessler.net/library/file_sigs.html But it seems a messy way of accomplishing this, and is incomplete. Any clues as to finding the binary record format and/or file signatures of Office documents (Office 2000 and greater). - Thanks ...

.PAB file
I have a .PAB file, but would like to tranfer contact details to the .PST file. I have Windows XP Pro + Office 2000. Jay <nospam> wrote: > I have a .PAB file, but would like to tranfer contact details to the > .PST file. Outlook's Import function should allow it. -- Brian Tillman Thanks Brian, I will try that. Out of curiosity, for which version of Office did the .PAB file stop being necessary? I gather that it is no longer needed. Jay "Brian Tillman" <tillman1952@yahoo.com> wrote in message news:O8X$OSqIHHA.1252@TK2MSFTNGP02.phx.gbl... Jay <n...

Opening Publisher 2002 Files
When trying to open a file in a terminal server environment I get the following error. Microsoft Publisher: The file s:\04a.pub cannot be opened. Access privileges have not been given. Publisher 2002 is installed on both Windows 2000 Terminal Servers. Is the file on a network drive? If so, try copying it over to your local drive. -- JoAnn Paules MVP Microsoft [Publisher] "Senior Systems Engineer" <Senior Systems Engineer@discussions.microsoft.com> wrote in message news:3AD4330E-A551-4110-8291-CA117D71FE6B@microsoft.com... > When trying to open a file in a termin...

Menu Options on File
I have Outlook 2000 working in Win2k with all the service paks installed. On my File menu I have a Backup menu option that allows me to back up my .pst files at pre- defined interavals. I have Outlook installed on WinXP Home and it does not give me the backup option. Is there something that can be set in Outlook on the XP system to give me that menu item? ...