List of publications
| Hyperlinks are to on-line versions of the article available to the general
public.
To view/hide notes and information, click the publication title. |
Books
Books I've co-authored (German as well as English)
- "Office VBA Macros you can Use Today"
November 2005
-
The book contains macros for use in every day tasks for the Office applications Excel, Word, Powerpoint, Outlook and Access. I wrote the chapter for Microsoft Word. Although the books is for "plug-and-play" macros, I built the chapter with an eye towards showing how to correctly use Word's object model. The order in which the macros are presented build on concepts presented in preceding macros, in the form of comments in the code.
|
|
Link for Amazon.com
|
- "Word Programmierung - Das Handbuch"
January 2006
-
This is the book I've always wanted to write, because I haven't been able to buy it. Only Microsoft Press, Germany, was willing to take a chance on it, which is why it's only available in German. Back in the days of WordBasic, we had the "Word Developer's Kit", which not only covered all the programming Help topics, but also illustrated how to actually use them to accomplish certain kinds of tasks. There was also the "Hacker's Guide" that described what things didn't work, and how to get the job done, anyway. While there are many books that present a beginner's level of VBA, very few actually discuss the object model. But none of them reach the depth and breadth of the two older books.
My co-authors and I - all MVPs - have tried to bring some of this to those needing to automate the modern version of Word (2000 through 2003). Code samples are primarily in VBA; C# versions of key procedures are also included, to give the .NET developer a starting point.
|
|
Link for Amazon.de
|
- "Microsoft Word Das Profibuch"
November 2002 (out of print)
-
The concept behind this book is similar to that of the programming handbook: to present a collection of information on how to best use Word, aimed at the professional worker. It does contain lots of macro code, where the Word application provides no built-in means to accomplish a task. The book covers as many facets of Word as is possible to cram into 700 pages. Again, only MS Press, Germany, was willing to take a chance. All copies were sold, so it's now only available as a used book.
|
|
Link for Amazon.de
|
MSDN website
Articles published in cooperation with Microsoft on the msdn.microsoft.com website
- "Effectively Using ActiveX Form Controls in Microsoft Word"
April 2003
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnword2k2/html/odc_activeX.asp
- "Automating Word Tables for Data Insertion and Extraction"
February 2005
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_wd2003_ta/html/OfficeWordAutomatingTablesData.asp
MS Office Pro
[formerly Microsoft Office & Visual Basic for Applications Developer (MOD)]
Informant Communications Group
Originally, these articles were archived on-line; now, many are only available on a CD containing all Informant articles published through 2002. Where the article was bought by Microsoft for the MSDN site, there is a link to that article.
-
Word Bookmarks
November 1999
-
What Word bookmarks are, what they can do, how to handle them, especially using VBA. Includes code for moving to Next/Previous bookmark in a document.
|
- Positioning Graphics
December 1999
-
Dealing with graphic objects in Word.
Article notes: A colleague pointed out that, while the code
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes.Count
Does indeed return all the shapes in all document headers and footers, the following code will return just the shapes in the particular header/footer. In other words, referring to the exact range will pick up only the Shapes anchored in the range.
ActiveDocument.Sections(2).Headers(wdHeaderFooterFirstPage).RANGE.Shapes.Count
A question came up in a Word newsgroup concerning Shapes on the second or following pages of a multipage document. If one programmatically changes the RelativeVerticalPosition to be relative to the page, the Shape jumps to the top of that page rather than staying in place. Here's are two bits of code to work around the problem.
The first one I have to thank MVP colleague Ibby for, this is certainly the fastest and most accurate approach:
With Dialogs(wdDialogFormatDrawingObject)
'Constant value = 1
.PositionVertRel = wdRelativeVerticalPositionPage
.Execute
End With
The second one calculates the current position and sets the .Top property to move the Shape back to its original position. 1) The .Top property of a Shape positioned relative to the text is the position in relation to the anchor; 2) A Shapes .Anchor property returns a range, that in turn can be used to get the .Information(wdVerticalPositionRelativeToPage). Adding these two values, we get a .Top value for repositioning the graphic.
Sub ShapeRelToPage()
Dim selpos As Single
Dim anchorpos As Single
Dim selectedShape As Word.Shape
Set selectedShape = Selection.ShapeRange(1)
If selectedShape.RelativeVerticalPosition _
<> wdRelativeVerticalPositionPage Then
selpos = selectedShape.Top
anchorpos = _
selectedShape.Anchor.Information( _
wdVerticalPositionRelativeToPage)
With selectedShape
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Top = selpos + anchorpos
End With
End If
End Sub
|
- Word Fields, Part I: Automate Word Documents with Minimal Code
April 2000
-
How to use Word fields to automatically insert and update information in a document without using VBA or other programming code.
Article notes: A reader kindly pointed out that there's a mistake in the logic used for Listing One - Create numbering sequences. The CreateStartNumDocProp procedure assumes that no custom document properties except for "StartNum" ones are present in the document. If other document properties already exist whose names do not start with "StartNum" the wrong property name could be generated. Here is slightly altered code that takes this into account.
Function CreateStartNumDocProp(ByVal sPropName, _
ByVal PropValue As Long) As String
Dim prop As Office.DocumentProperty
'If no DocProperties, or none with StartNum in name
'DocProperty name is StartNum1
If ActiveDocument.CustomDocumentProperties.Count = 0 Then
sPropName = "StartNum1"
Else
'Otherwise, increment StartNum by 1
For Each prop In ActiveDocument.CustomDocumentProperties
If Left(prop.Name, 8) = "StartNum" Then
sPropName = "StartNum" & _
CStr(Val(Mid(prop.Name, 9)) + 1)
End If
Next prop
End If
'sPropName has not been changed, no StartNum properties
'but other custom doc properties exist in document
If Len(sPropName) = 8 Then sPropName = "StartNum1"
'Create DocProperty and set value to
'number of selected paragraphs plus 1
ActiveDocument.CustomDocumentProperties.Add _
Name:=sPropName, Type:=msoPropertyTypeString, _
Value:=CStr(PropValue + 1), LinkToContent:=False
CreateStartNumDocProp = sPropName
End Function
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnovba00/html/wordfieldsparti.asp |
- Word Fields, Part II: Numbering Conundrums
May 2000
-
How to use Word fields for special numbering requirements, such as relative cell references in Word tables, continuing numbering using letters as in Excel columns (AA, AB, AC instead of AA, BB, CC).
|
- From Word to... Getting Word Data into Access, Excel, etc.
February 2001
|
Smart Access
Pinnacle Publishing, Inc.
-
More on the Report from Hell
July 2000
-
How to handle page formatting in Word, manually and programmatically: sections, header & footers, page orientation, page numbering, and other page layouting questions.
|
Computor Companion
Logical Expressions, Inc.
Back to the top