Open Primary .rc File As Text

The following macro opens the primary .rc file as text.

Sub OpenRCFile()
‘DESCRIPTION: Opens the primary .rc file as text
‘NOTE: If the resource file is already open within the
‘ resource editor, you may be asked if you wish to
‘ close it.

‘ Simply strip the project filename of its extension…
‘ …and replace it with "rc"
If Projects.Count = 0 Then
MsgBox “Load a project first.”
Exit Sub
End If
PathName = ActiveProject.fullname
PathName = Left(PathName, Len(PathName)-3)
PathName = PathName + “rc”
Documents.Open PathName, “Text”
End Sub

More by Author

Must Read