About Chris Painter

This author has yet to write their bio.
Meanwhile lets just say that we are proud Chris Painter contributed a whooping 20 entries.

Entries by Chris Painter


Checking if a document has macros

In Word 2003, if you need to know if a document contains any VBA code/macros in it, you can use the following function. Function ContainsCode(ByVal Doc As Document) As Boolean ContainsCode = False Dim comp As Object For Each comp In Doc.VBProject.VBComponents   If comp.CodeModule.CountOfLines > 0 Then     ContainsCode = True     Exit Function […]


I often fake it… with Subst

I spend lots of time developing for different clients, and the problem is most clients have their own drive mappings pointing to specific network locations. In a lot of cases, I need to replicate these drive mappings as it’s usually where they store their Workgroup templates for Word, Excel and PowerPoint. So instead of setting […]


Undoing in bulk

One of my fave features in Word 2010 is the new custom undo records. It allows you to group your changes via code into blocks that can be undone in a single go – plus you can name the records. Take the following sub: Sub InsertSomeText() Selection.TypeText “This is a test” Selection.TypeParagraph Selection.TypeText “This is […]


Getting a document’s edit time in WorkSite

Have you ever tried to get the edit time from the IManDocument or NRTDocument objects within Autonomy WorkSite? There’s the AccessTime property which returns the date plus time, but the EditDate property is just the date, and the time part is missing (set to 12:00am). So how do you get the date and time? Turns […]


Slow to open documents in Word 2010

Usually the cause of documents being slow to open in Word is when the attached template is missing – especially when the template is located on a network. Turns out with Word 2010 there can be another reason. We had a client where some documents were taking between 25 and 30 seconds to open, but […]


Save time with Problem Steps Recorder

I’m spending a lot of time in issues lists at the moment, and so many issues are very poorly logged, with no details or steps on how to replicate the problem. Well that’s where the Problem Steps Recorder in Windows 7 comes in very handy. Get the users to type in PSR into the search […]


Save As in Word 2010 just won’t let go

I experienced an interesting (or should that be frustrating) problem recently during an Office 2010 migration. We have some code in Word that saves the current document into Autonomy WorkSite. The code works by doing a Save As of the current document to a temporary file, and then saving the document again to free up […]


Updating your WorkSite code for Office 2007/2010

Autonomy recently released WorkSite 8.5 SP3 Update 1, which includes updated integration for Office 2007 and 2010. The integration, so far, is much better than the old version. The only problem is that it kills all your code that used the old iManOXP.dll (iManO2K.iManageExtensibility) but don’t worry, it’s easy to update your code to get […]

© Copyright - Mosmar