Philip: I began using fields years ago for the same reason. Changing a hundred spec sections at the last minute isn’t much fun! I’d like to see your solution; mine is explained in part 10 of the SpecProcessor! series.
anyone know how to do these date changes and update inserts in wordperfect?
An “open file” macro (written to open every file); that includes a “footer” macro (run from within the “open file” macro) would do the trick.
Sheldon:
Thanks for sharing your ideas!
I like the simplicity of your external fields. My utility uses word’s programming language (VBA) to allow the user to enter whatever data needed to populate the headers/footers for the project from a dialog box to enter the data (date/proj#/projname/etc), then a list box of all sections in the project to select any or all for formatting. Then it creates a copy of all selected docs with the revised/new information. The source files are unaffected. This has been a help to create new spec drafts from our master library and/or using other projects as a resource.
The program essentially stores the data in the custom properties of the individual documents all kinds of data can be saved between editing sessions safely inside the actual document. your system of the external fields seems a lot simpler but what happens if this external file goes lost?
the user(s) of individual sections (.docs) in my system sees footers/headers with actual text data, not field codes.
Other program functionality:
- allows users to extract bookmarked data to create a list of submittal requirements (contractors love this, CSI is probably having tummy rumbles)
- a toggle to keep or eliminate LEED boilerplate language depending upon the project requirements.
- allows for configuration and placement of certain phrases (for example: supplementary gc’s (the specific language of which can vary with the client - some state agencies have differing terminology) or other specific references in the front part of each section that can be easily changed globally
All this functionality is at a price fairly complicated. this may all sound frightfully confusing without seeing it, but i am trying to describe it as best i can. i would be happy to send the code to you (use at your own risk!!).
i should play with your idea - see if i can deconstruct my rube goldberg creation. perhaps your field code ideas could just as easily do some of the other tasks too.
thanks again for your ideas
Phil, thanks for the offer–I’d love to see your code. I’ve done a fair amount of VBA coding, but I got stymied by the effort to create a file pick list. I may borrow some routines to beef up some of mine. If you are a subscriber to MasterSpec, you should check out their MasterWorks software (free with subscription). It automates some tasks exactly as you describe. My e-mail is jbunzick@smma.com.
First trick of the trade is having the right music!
But some additional VB macros in Word can help expand capabilities and work around minor difficulties with MASTERSPEC. I try to avoid anything that would be at all difficult for outside design consultants to do with MASTERSPEC. Will try to post a couple of the shorter macros that have been the most helpful.
Philip, please send your code, swolfe@bwbr.com. I’ve been trying for several years to get our IT people to do some programming, but, as Rodney Dangerfield would say, “I just don’t get no respect.”
Here’s one I find very useful - attaches a style template to a spec section for nearly instantaneous reformatting from standard MASTERSPEC. This macro does the same thing as going to Tools, Templates & Add-ins, and attaching a template manually and checkarking the update styles box. The advantage of the macro is you can put it in a toolbar &/or set up hot-key for it.
Sub SpecAttachTemplate()
’
’ SpecAttachTemplate Macro
’ Macro recorded 2/1/2007 by Chris Grimm
’
(indent 1) With ActiveDocument
(indent 2) .UpdateStylesOnOpen = True
(indent 2) .AttachedTemplate = _
(indent 3) “SpecTemplate.dot” 'you need a template file that has MASTERSPEC styles properly revised to your preferences (not using overrides, but using format menu styles option instead). Save it next to your normal template or at another location such as workgroup or startup templates folder.
(indent 2) .XMLSchemaReferences.AutomaticValidation = True
(indent 2) .XMLSchemaReferences.AllowSaveAsXMLWithoutValidation = False
(indent 1) End With
(indent 1) 'if desired insert a select all and your preferred font here sub to force normal style, only needed if some of your documents have style overrides
End Sub
If needed you can follow this with a macro to remove the extra spacing, and call both macros together as subroutines.
Sub SpecRemoveSpaces()
’
’ SpecRemoveSpacesPR2 Macro
’ Macro recorded 2/1/2007 by Chris Grimm
(indent 1) 'PR2
(indent 1) Selection.HomeKey Unit:=wdStory
(indent 1) Selection.Find.ClearFormatting
(indent 1) Selection.Find.Style = ActiveDocument.Styles(“PR2”)
(indent 1) With Selection.Find.ParagraphFormat
(indent 2) .SpaceBefore = 12
(indent 1) End With
(indent 1) Selection.Find.Replacement.ClearFormatting
(indent 1) Selection.Find.Replacement.Style = ActiveDocument.Styles(“PR2”)
(indent 1) With Selection.Find
(indent 2) .Text = “”
(indent 2) .Replacement.Text = “”
(indent 2) .Forward = True
(indent 2) .Wrap = wdFindContinue
(indent 2) .Format = True
(indent 2) .MatchCase = False
(indent 2) .MatchWholeWord = False
(indent 2) .MatchWildcards = False
(indent 2) .MatchSoundsLike = False
(indent 2) .MatchAllWordForms = False
(indent 1) End With
(indent 1) Selection.Find.Execute Replace:=wdReplaceAll
… repeat for PR3, PR4, etc.
Then the main macro to call in your button or keystroke:
Sub Spec()
(indent 1) 'add macro to turn off track changes if you might have it on
(indent 1) SpecAttachTemplate
(indent 1) SpecRemoveSpaces
(indent 1) 'add other preferred view settings here if needed - I like to turn document map on and set it to level 2 to save a lot on scrolling through long specs, and with normal view with word wrap turned on.
End Sub
Another button can be used to toggle to a print preview mode while still editing.
Disclaimer- This has worked well for me for years, with minor tweaking over time, and should be very stable unless I put in any typos trying to show indents correctly here - but diferences can exist between versions so use with caution. No text is modified by these macros either, only formats. I’ve used for Word 2000 and 2003 without trouble. When in doubt, save your document before running. If you don’t like what you get then you can close without saving and go back to what you had.
Philip - Sounds like you are using bookmarks in your system? I am beginning to explore some new possibilities with that. Would love to see some of your code. (chrisgrimm@ls3p.com). Sounds promising for tagging data that might be extracted for auxiliary purposes. I have found them useful so far just to get Word to hold still when I switch between PrintView and SpecView macros. Bookmarks might also be more promising than color-coded text or hidden text tags for global deletion of LEED, MPI, etc., as long as wildcards are accepted or can be programmed into a Go to Bookmark command.
Chris:
finally found my code and it is on its way.
if anyone else is interested i can send you the bookmark code
- Phil
With bookmarks, you don’t actually have to “go to” them when writing macro code. You can merely extract their value directly depending on what you want to do.
correct - my little code doesn’t use a go-to command
the bookmarks are being used in my specific app to identify and select a specific block of text and do something specific to it, rather than data extraction/insertion which I think was their original raison d’tre.