Microsoft KB Archive/168081

= FIX: Wrong Column Jumped to for Macro Syntax Error =

Article ID: 168081

Article Last Modified on 12/1/2003

-

APPLIES TO


 * Microsoft Visual C++ 5.0 Enterprise Edition
 * Microsoft Visual C++ 6.0 Enterprise Edition
 * Microsoft Visual C++ 5.0 Professional Edition
 * Microsoft Visual C++ 6.0 Professional Edition
 * Microsoft Visual C++ 6.0 Standard Edition

-



This article was previously published under Q168081



SYMPTOMS
When you attempt to load a macro that contains a syntax error in Developer Studio, an error message similar to the following appears:

c:\program files\devstudio\sharedide\macros\mymacro.dsm This macro file contained the following error and will be unloaded Line 6: Expected ')' if (ActiveDocument.selection.FindText"CWnd") then Would you like to edit the file?

If you choose to edit the file, the cursor is not placed in the column where the error occurred. However, the cursor is placed on the correct row.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article.

This problem was corrected in Microsoft Visual C++ .NET.



Steps to Reproduce Behavior
 From the Tools menu, select Macro Enter "finder" as the Macro Name (excluding the quotes). Click Edit. In the Add Macro dialog box, click OK.  Insert the following code into the body of the finder subroutine: if (ActiveDocument.selection.FindText "CWnd") then msgbox "Found!" end if The finder subroutine should look like this: Sub finder 'DESCRIPTION: A description was not provided. if (ActiveDocument.selection.FindText "CWnd") then msgbox "Found!" end if     'TODO: Put macro code here End Sub  From the macro editor's context menu, select Reload Macro File to reproduce the error message.</li></ol>

Keywords: kbbug kbfix kbnoupdate kbautomation KB168081

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.