Get Friend File
Macro that opens the corresponding .h / .cpp file (i.e. if fnurt.h is active it opens fnurt.cpp and vice verca)
and works best if used via a accelerator key (using Alt-1 myself).
Quite lo-tech but useful never the less.
Sub GetFriendFile() 'DESCRIPTION: Opens the corresponding .h / .cpp file currentFileName = Application.ActiveDocument.FullName newFileName = "" if (Ucase(Right(currentFileName,2))=".H") then newFileName = Left(currentFileName,Len(currentFileName)-2)+".CPP" elseif (Ucase(Right(currentFileName,4))=".CPP") then newFileName = Left(currentFileName,Len(currentFileName)-4)+".H" end if if newFileName<>"" then Application.Documents.Open newFileName End Sub
Date Last Updated: February 3, 1999
IT Offers
More for Developers
Top Authors
- Voted: 13 times.
- Voted: 11 times.
- Voted: 11 times.
- Voted: 8 times.
- Voted: 8 times.
- Paul Kimmel 214 articles
- Zafir Anjum 120 articles
- 15Seconds.com 99 articles
- Tom Archer - MSFT 83 articles
- Jeffrey Juday 82 articles


All