Geeks With Blogs
Teh Grumpy Coder Comments from the Digital Underbelly
I'm a big fan of being a self-starter, always learning, and trying new stuff. A big percentage of what I've learned in the software biz has been ratting around in other people's code...

I had one Fortran IV class back in '67 and I sucked at it. I had some 1-on-1 help from a great guy teaching me BASIC in '68, and since then it's been Assembly (how many people bought their own copy of MASM?? -- twice??), Pascal, C, C++, C#, various databases, and forgetabout all the OS versions from mainframes to 8086 BIOS code and then out to Silverlight 3.

And I had to learn all that on my own. I'm not complaining, I'm just sayin'...

But apart from a few things, I did NOT learn them on forums. Well, forums didn't exist for half of that, but you know what I mean.

I particularly hate asking questions on forums and avoid it at all costs. And why? Because of the people that troll the forums to respond to questions to get their 'stats' up.

Case in point... I need to read a Word doc. NOT a docx, We're talking Office 2003 (in 2009). More specifically, I've got a doc that has a bunch of fields the user fills out, and I need to import that data from a web page and populate a web form then push it into the database.

In writing code 42 years, I've not had to become an Office Interoperability expert, and I have no need to do so now.. I just need to read this freakin' form.

So I spend a whole bunch of time in search engines seeing other people asking for the same information and getting a lot of the same answers:
  • A two-liner instantiating a class with no other explanation, and HTF is that supposed to help
  • A link to MSDN -- geez that was the first stop and got me part way
  • Code that is obviously broken -- don't bother downloading
  • Code that doesn't work when you try to run it 
And my favorite(not):
  • The guy that decides it's his job to make the questioner 'learn how to do this' rather than 'give him code' -- I've seen them actually say that.

Hey AHole... go back to WOW or whatever it is you did before you became a computer guru in HighSchool. If I wanted to LEARN Office Interoperability, I'd dig into it. Meanwhile I've got a manager standing in my cubicle waiting for this code.

Yeah I know, push a button and go on, but there are a LOT of those folks out there, and I don't understand what it is they think they're accomplishing other than driving away people that are trying to pick up some knowledge.

I tried for a while to answer questions on the [...] forum, but unless you camp out on the forum hitting F5 every 10 seconds, it's impossible to respond to someone without overwriting someone else's post. I don't know what some of those guys do for a living, but I'm sorry, I have to get product out the door and don't have time to try to race someone to answer every forum post.

My hat is off to all of you that persevere and post thoughtful helpful responses on the forums and take time to actually read what the questioner writes before you post an answer.

And as long as I'm posting this, I will say that UtterAccess.com has the highest signal-to-noise ratio of any place I've ever been.

OK now back to trying to read FormFields. When I figure it out I'll post a solution here.

 

Posted on Friday, July 24, 2009 9:22 AM Rants , Coding | Back to top


Comments on this post: Why I hate Software Forums

# re: Why I hate Software Forums
Requesting Gravatar...
I hate dealing with Office 2003 Interop, so I know what you are feeling. I had to solve the exact same problem recently, so I figured I'd give you my solution.

I am using the Office 2003 PIA, and have a a using statement like this at the top of my code:
using Word=Microsoft.Office.Interop.Word;

So with out any delays, here is how I extracted every form field from a document:

static void Main(string[] args)
{
object Missing = System.Reflection.Missing.Value;
object filename = @"Name.doc";

//Create a Word Document
Word.ApplicationClass app = new Microsoft.Office.Interop.Word.ApplicationClass();

//Create a document representing the file we want to open. Set eveything to missing becuase we
//don't care about it.
Word.Document doc = app.Documents.Open(ref filename, ref Missing, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing,
ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing, ref Missing);

//Iterate thorugh the collection of form fields extracting the relevant information
foreach (Word.FormField ff in doc.FormFields)
{
Console.WriteLine("Name: " + ff.Name); //This is the name of the form Field
Console.WriteLine("Result: " + ff.Result); //This is the result of what the user inputed.
Console.WriteLine();

}

object saveclose = false;
doc.Close(ref saveclose, ref Missing, ref Missing);
app.Quit(ref saveclose, ref Missing, ref Missing);
Console.ReadLine();
}
Left by thorkia on Jul 25, 2009 7:10 AM

Your comment:
 (will show your gravatar)


Copyright © TehGrumpyCoder | Powered by: GeeksWithBlogs.net