Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word Macro Problems After 2003 Upgrade 1

Status
Not open for further replies.

Veep

Programmer
Jan 10, 2002
1,368
US
I've got a Word Macro(SubRoutine) that lives in Normal.dot. It's been working fine for the past five years in both Word97 and Word2000. Several folks have been upgraded to Office2003 lately and for them the macro is broke. The sub itself isn't extraordinary in any way, it does some formatting to however many pages are in a document that the user opens. Anyway, it blows up at the first line:
Code:
Sub Barcode()
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
        ActiveWindow.Panes(2).Close
End If
............
The error is: Object variable or With block variable not set. In the VBEditor it appears that the error is pointing at ActiveWindow.View.SplitSpecial. Intellisense recognizes everything and there are no missing references. Any ideas why this would pop up now with Word2003?
Thanks in advance for any insights.
 
Have you tried this ?
If ActiveDocument.ActiveWindow.View.SplitSpecial <> wdPaneNone Then

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Cool...that got me past the first instance of ActiveWindow before it blew. Now I know where I'm going. Thank you. Do you have any idea why this is happening now?
Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top