Woo! Thanks muchly.
Corkscrew
@Corkscrew
Best posts made by Corkscrew
Latest posts made by Corkscrew
-
Extremely basic VB oddness
Can anyone clue me in on why the following snippet wouldn't work? The
file definitely exists - I know because elsewhere I "put" to it and I
copied the Open line directly from that bit of code. Also the file
definitely has contents (I checked with notepad). And yet the msgbox
that pops up is empty. No exceptions being thrown or anything afaict.
k = FreeFile
Open "c:\outlooklog.txt" For Binary As #k
Get #k, , htmlbodystr
Close #k
MsgBox htmlbodystr
For the record, the code I used to write to the file looks like:
Set myitem = Application.CreateItem(olMailItem)
myitem.Display
Open "c:\outlooklog.txt" For Binary As #1
Put #1, , CStr(myitem.HTMLBody)
Close #1
This is using VBA in Outlook (god help me :() -
RE: Guides to best practices for newbies?
Ooh, shiney :) Thanks, that's exactly what I was after. The one entitled "The
fine Art of Commenting" in particular should be required reading for
all CATAMites. I have too many friends who don't understand the concept
and, moreover, name their variables after stars - yes, I have seen
variables called Betelgeuse - famous composers or mathematicians, or
simply use names that would make perfect sense if I was able to read
Latin. This being Cambridge, we get a very high class of obfuscation... -
RE: Guides to best practices for newbies?
That link should be to http://www.srcf.ucam.org/mathwiki - don't know what happened.
-
Guides to best practices for newbies?
I'm running a community site for mathematicians at my university. One of the things we have to do as part of our course is a set of computer projects collectively known as CATAM (Computer Assisted Torture of All Mathematicians). This is a slight problem for many people as at least half the mathmo population has never programmed before.
Being a techie type, I tend to get called in for tuition by those who really don't have a clue. And their code is disgusting. It's all those things that techies tend to pick up in their first week of programming then forget they ever learned. Little things like commenting code (hey, some of us do this), indenting stuff, not naming all variables after letters of the alphabet etc.
Are there any guides to the real basics of programming best practice floating around on the 'net? It'd save me time and these poor mathematicians much pain. Won't someone please think of the mathematicians!