microsoft.public.scripting.vbscript - Microsoft Office Project
Hi All, I programmatically insert a plain text content control in a footer with below code. Microsoft.Office.Interop.Word.Document wordDocument = application.Documents.Open( ref fileName, ref objFalse, ref objReadOnly, ref objFalse, ref objMissing, ref objMissing, ref objFalse, ref objMissing, ref objMissing, ref objMissing, ref objMissing, ref ObjVisible, ref objFalse, ref objMissing, ref objTrue, ref objMissing ) as DocumentClass; //cursor is focused some where in Footer before I call this code. object range = wordDocument.ActiveWindow.Selection.Range; ContentControl cc = wordDocument.ContentControls.Add(WdContentControlType.wdContentControlText, ref range); cc.Tag = "myContentControl" Here wordDocument.ContentControls.Add() returns a content control without adding it to the wordDocument.ContentControls collection. The wordDocument.ContentControls.Count remains same before and after. Strangely, I could see the same conten control in the collection with the following code: ContentControls ccs = wordDocument.SelectContentControlsByTag("myContentControl"); As I need to iterate wordDocument.ContentControls in different parts of my application for all content controls (without bothering about tag)in the document, Could you please suggest me how I can add it(CC in footer) to wordDocument.ContentControls or a collection where I can retrieve it later. Thank in Advance, Srinivas ps: I have same problem inserting a content control in a Text Field.
Hello, I am a teacher & have to create a standard layout lesson plan for my management's occasional perusal. I'd like the box (cell in a Word 2007 table) which they have called "Keywords" to automatically populate that document's tag (the metadata that is visible in Explorer and is made available to Vista's search via "tag:pythagoras") Can anyone help? I assume I need to set that box to be a field, but then how to write the file's metadata, and how to capture multiple values into multiple tag values. pythagoras; geometry ; proof I'm in Word 2007 and about 5 years ago was a reasonable coder in VBA for Excel 2003 if that's any use at all! Cheers Rob
hi, i need VBA code - Extract word document content and save in MS Access. Regards Raju A
Hi All, I have a large number of word documents with me and each document contains section called introduction or overview (header 1) (it is either one of the two). I would like to consolidate all of this into a new word document. How do I do the same In short take (overview/intro) sections from different document and dump it into a single word file. Here are my computer details OS: Windows XP Office 2003 Professional Regards, Arry