InsertFieldAfter Function in Word VBA

November 4, 2010

I wanted a function in Word VBA that would add a Field to a Range’s Fields collection and automatically extend the Range to include the added field.

This mimics the behavior of the Range.InsertAfter function and similar functions.

It allows you to keep adding text, fields, and other items to a Word document sequentially.

The function I created is called InsertFieldAfter. Its parameters mimic the parameters to the Fields.Add function.

The Range you pass in is extended to include the newly added Field. The new Range is also returned as the function return value for convenience.

The text of the function and related support functions is below, followed by an example of how to use the function.


An Aggressive Agenda of Domestic Reform

July 1, 2010

In the approximately 17 months of the Obama administration, we’ve seen sweeping domestic policy reform efforts. It started Day One (Inauguration Day) with closing the Guantanamo Bay camps. But we’ve had much larger domestic reform packages:

  • financial industry reform
  • health care reform
  • energy reform – given incredible life by the BP Oil Disaster

Energy reform is far from settled, yet today I received an email from the White House about the next biggie – immigration reform

This is no criticism, but rather a commentary. I’m glad Obama has decided to “take no prisoners”. He’s not slowing down for anything. He came into office for a four-year term determined to make the changes that we’ve all been talking about for years but didn’t have the motivation to really do anything about.

We all know people need to be better taken care of by our health care system. We all know that dirty fossil fuels are destroying our incredible natural environments and ecosystems. We’ve known these things for decades. Yet finally someone has the courage to stand up and do something about it. Not that the new policies won’t have their problems, because they will. I am of the opinion that any change is better than no change. Some might think that unwise. But I think if you at least make some change, it puts the item on everyone’s agenda and we can always tweak the policy after it’s been in place for a time and you’ve had an opportunity to see any shortcomings. But it’s important to take a step to get everyone out of their apathetic state.

The issues are less clear when it comes to immigration reform. Even though all Americans are immigrants (other than the Native American population), many people are in favor of tight controls on immigration. The thought is, “we’re here. Let’s protect what we’ve got.” Of course, if that had always been true, we might not be here and be able to say that.

It’s a challenging issue. The Statue of Liberty stands there in New York Harbor, welcoming immigrants. The Melting Pot is a critical part of our national identity. It’s very much a part of what makes America America. It’s one of our strengths – the wide array of cultural perspectives enhances our national “gene pool” and makes us more flexible and dynamic. It’s one of the reasons the entire world looks to us to be the protectors of what’s right and just, and why we are expected to have magnanimity and grace in our dealings with other peoples. It’s one of the reasons our imperialistic invasions of other countries is shameful to our American heritage. But that’s another story…

Below is the text of the letter from David Axelrod, Senior Advisor to the President on the topic of immigration reform that I received today:

Subject: Meeting Another Great Challenge: Comprehensive Immigration Reform

Good morning,

In a time of unprecedented challenges, President Obama has risen to meet them in unprecedented ways. And today, the President will be addressing yet another issue our nation has faced for decades — our broken immigration system. In a major speech at American University at 10:45 a.m. EDT, the President will make the clear case for comprehensive immigration reform.

The President believes that we must have a practical, common-sense approach that reflects our heritage and our history — as a nation of immigrants and a nation of laws. Government must be accountable for enforcing the law, businesses that seek unfair advantages over competitors must be accountable for exploiting the system, and those who break the law must be accountable as well.

But as always, the President will put it more eloquently than I can, so tune in for the speech streamed live at at 10:45 a.m. EDT. If you miss it, at 1:00 p.m. EDT, you can still join Cecilia Muñoz, one of the President’s closest advisors on this issue, who will be taking questions from Americans all over the country in a unique online roundtable.

The President has already signed the Recovery Act, historic reforms of our health care system, and soon the most comprehensive financial reform since the Great Depression. He has also made clear that passing comprehensive energy and climate legislation to make America the leader in the clean energy economy is an urgent need.

But the President did not come into office only to leave pressing problems for the next President. Virtually everybody in America agrees that our immigration system is broken — it is only a matter of all political sides coming to the table and mustering the political will to solve the problem. Neither of the extreme approaches — deportation of 11 million undocumented workers on the one hand, or amnesty for those that broke the law on the other — is going to work. We have to work together.

David Axelrod
Senior Advisor to the President

They’re Dropping Like Flies Redux

June 27, 2010

In a previous post I used the title They’re Dropping Like Flies about people dying. I’m using it today as the title of this post to refer to the topic of public figures botching up their public communications and catching flack or getting fired because of it.

The three people in the last several days that did this are:

  • Helen Thomas – White House correspondent since 1960
  • Alan Simpson – long-time US Senator from Wyoming and co-chair of the Presidentially-appointed National Commission on Fiscal Responsibility and Reform
  • Gen. Stanley McChrystal – Commander of US Forces in Afghanistan

Helen Thomas

From Wikipedia:

On May 27, 2010, outside a Jewish Heritage Celebration Day event at the White House, the following exchange took place between Thomas and Rabbi David Nesenoff:[

Nesenoff: Any comments on Israel? We’re asking everybody today, any comments on Israel?

Thomas: Tell them to get the hell out of Palestine.

Nesenoff: Oooh. Any better comments on Israel?

Thomas: Remember, these people are occupied and it’s their land. It’s not German, it’s not Poland …

Nesenoff: So where should they go, what should they do?

Thomas: They go home.

Nesenoff: Where’s the home?

Thomas: Poland. Germany.

She seems to have lost her tongue. Ms. Thomas was 89 at the time of her comments. Perhaps she got tired of holding in her true viewpoint. A person in her position however is expected to be impartial. Of course she has her viewpoints, but in her position, she’s really not supposed to open her mouth about it.

Alan Simpson

Alan Simpson was a long-serving US Senator from Wyoming, and is now co-chair of the Presidentially-appointed National Commission on Fiscal Responsibility and Reform, charged with, among other things, ensuring the stability of Social Security. He was interviewed after leaving a meeting last week and was quoted as saying that we need to take care of the “lesser people” – those receiving social security. This was not a popular reference. He’s taken a lot of flack for this.

Gen. Stanley McChrystal

Four-star Army General Stanley McChrystal was the Commander of US Forces in Afghanistan until June 23, 2010 when he resigned amid a flurry about a Rolling Stone profile of him and his stiff that appeared in the June 25 issue. The issue was that he and his staff made disparaging and disrespectful remarks about several civilian US leaders, including Vice-President Joe Biden and the US ambassador to Afghanistan, among others.


What’s the common thread here? You have three people in high-profile positions saying what’s on their mind. They spoke their truths, but they weren’t popular ones, that’s for sure. I’m not sure what to make of it. People are letting it all hang it. It’s just as well. It’s great to know where people really stand, instead of just assuming you know what’s on their mind. Maybe that’s what’s so great about these developments.

What’s with all the violent dark movies being made?

May 31, 2010

I just got an email from Blockbuster promoting the top five new release rental movies right now. They are:

  1. Edge of Darkness
  2. Legion
  3. Daybreakers
  4. Tooth Fairy
  5. It’s Complicated

Let’s also consider the Missed It? Rent It? list:

  1. Edge of Darkness
  2. The New Daughter
  3. The Messenger
  4. Daybreakers
  5. The Spy Next Door

We’ve got 8 separate movies there. Let’s make a new list, adding the MPAA ratings and reasons:

  1. Edge of Darkness (R: strong bloody violence and language)
  2. Legion (R: strong bloody violence and language)
  3. Daybreakers (R: strong bloody violence, language and brief nudity)
  4. Tooth Fairy (PG: mild language, some rude humor and sports action)
  5. It’s Complicated (R: some drug content and sexuality)
  6. The New Daughter (PG-13: thematic material including violence, disturbing images and brief strong language)
  7. The Messenger (R: language and some sexual content/nudity)
  8. The Spy Next Door (PG: sequences of action violence and some mild rude humor)

OK, so of the 8, we have 3 with “strong bloody violence” and one with “violence” and “disturbing images” (suitable for 13-year-olds, mind you).

Out of the whole range of human experience, 4 of 8 top movies available now have strong bloody violence or just regular violence and disturbing images. Does anyone think this a little excessive? What does it mean, if anything?

We seem to be co-creating a world filled with dark disturbing images and violence, not only in our “real” world, but also in our art and media. Why don’t we create a new reality? How much longer do we think we can keep creating this reality without continuing to have intense pain, suffering and trauma. Can we all get together and realize that the world isn’t an “is” – that it doesn’t exist apart from us, that it is really our creation, that the reality we experience is one of our own making? If more people started realizing that, maybe we could all decide together to “stop the insanity”. Let’s do it!

Save Time with Internet Explorer Shortcuts

August 21, 2009

Just published my latest article “Save Time with Internet Explorer Shortcuts” in Computor Companion. It tells you all the keyboard shortcuts you can use to speed up your life in Internet Explorer. This is my first article in Computor Companion. Here’s a list of my articles in another excellent free online publication TechTrax.

The Generation M Manifesto by Umair Haque

August 2, 2009

Kathleen Morris sent me this link to Umair Haque’s Generation M Manifesto – a blog post describing some of the qualities of the new directions in the economy and society in general. Out with the big autos and bloat, in with integrity and wholeness. Notice it says you don’t HAVE to be young to be in this club of people who want to evolve the world – you just have to want it and have the vision.


Umair Haque’s Generation M Manifesto

Art Benjamin works his math magic (he’s a “mathemagician”) at the 2005 TED show

July 21, 2009

Wow – watch Art Benjamin do incredible math calcularions in his head at the 2005 TED show.

Shared via AddThis, which seems to be a very cool service.

They’re Dropping Like Flies

July 19, 2009

I don’t know whether it’s just because I’m paying more attention to the news than ever before (which is true), or if it’s true that celebrities are dying in record numbers right now. It seems the names of many household names (at least in my household) when I was growing up are now passing. It really came to a head that one week in June which saw the passing of Ed McMahon, Karl Malden, Farrah Fawcett, and Michael Jackson all in one 9-day period. Last week, Walter Cronkite died.

I put the following list together. It was hard work – I read through the list of everyone who died in 2009 from the IMDb – as I finish, I feel like I’ve just emerged from a morgue! Meanwhile, Michael Jackson’s “Thriller” was playing on iTunes. Oy!

Let’s see…

  • Rev. Sun Myung Moon (Jan. 11) – the Korean church lead who was famous when I was a kid in the 70’s for performing mass marriages
  • Ricardo Montalban (Jan. 14) – our beloved Mr. Rourke from Fantasy Island – also famous as Khan in Star Trek and a major character in the Planet of the Apes movies
  • John Updike (Jan. 27) – the famous American writer
  • James Whitmore (Feb. 6) – actor from the 50’s on
  • Blossom Dearie (Feb. 7) – famous jazz singer
  • Ron Silver (March 15) – actor from Rhoda in the 70’s and many well-known movies
  • Natasha Richardson (March 18) – ah, what can we say – I loved her in The Parent Trap, the movie that made Lindsay Lohan. Liam Neeson’s wife. Killed in a skiing accident.
  • Bea Arthur (April 26) – I hope you remember our beloved Maude from the 70’s, and if not, certainly you remember her as Dorothy from the Golden Girls. She was an icon of my youth.
  • Hans Holzer (April 25) – you may not remember this guy, but when I was a kid in the 70’s, Hans Holzer was writing all these incredibly wild books about his research into UFO’s and ghosts
  • Dom DeLuise (May 4) – every great Mel Brooks movie had Dom DeLuise. Too many to mention. One movies you might not have seen is 1980’s Fatso – try to catch it – Anne Bancroft directed and co-stars as the Italian mother that virtually creates an eating disorder in her son DeLuise.
  • Wayman Tisdale (May 15) – NFL pro from the 80’s and 90’s
  • David Carradine (June 3) – hugely famous for the Kung Fu television series, and then later for the Kill Bill movies
  • Ed McMahon (June 23) – Johnny Carson’s right-hand man on the Tonight Show, and Publisher’s Clearinghouse pusher
  • Farrah Fawcett (June 25) – a central figure of my childhood, one of Charlie’s original Angels
  • Michael Jackson (June 25) – the King of Pop
  • Gale Storm (June 27) – actress from the 50’s, played My Little Margie
  • Karl Malden (July 1) – I remember him from the original The Taking of Pelham 1-2-3, but he was in countless movies over many decades
  • Steve McNair (July 4) – recent MVP NFL quarterback, apparently murdered by his mistress who the killed herself
  • Arturo Gatti (July 11) – Italian-Canadian boxer, apparently murdered by his wife. The athletes aren’t doing too well this year. And against the women – that’s a fascinating social commentary in itself.
  • Walter Cronkite (July 17) – everyone’s Uncle Walter

(I apologize if I have not mentioned someone close to you. These are just the people that I noticed during my visit to the 2009 morgue at IMDb.)

Gee, this has been uplifting! Death is certainly a difficult subject. For most of my life, I didn’t think much of it. Now that I admit it’s an eventual certainty for me, my wife, my entire family, all my friends, everyone I know, and everyone I’ve ever heard of, it seems like something I should get to know. Maybe even think of it as a friend with whom I have a date planned for some unknown time in the hopefully distant future.

No One Wants to Talk on the Phone Anymore

July 18, 2009

Have you noticed no one wants to talk on the phone anymore? It’s all about text messaging. I have a feeling no one even wants to listen to voicemail messages anymore. There’s all these changes in our society happening.

For example:

  • Our 18-year-old son will never leave voicemails for anyone now. We ask him, “If you don’t leave a voicemail, how will the person know you called?” He just shrugs.
  • We have a family member who will may call several times a day, but never leaves a message. It almost feels like he’s a stalker. If you have something to say worth picking up the phone and calling us for, why isn’t it worth leaving a message about?
  • I’ve noticed when our son is watching television that he tunes out the rest of the world. I know someone who says he ex-husband used to do that to her, and her young sons do that now. I don’t think it’s just happening in my family…
  • Our 21-year-old daughter who lives on her own does not have a landline – only a cell phone. This is no surprise these days.
  • The same daughter rarely picks up her phone.
  • Frequently, we can’t leave her a voicemail because her mailbox is full.
  • Most times when we are able to leave her a message, we’re clear she never gets it. That’s why her mailbox is frequently full – she doesn’t check her messages. Maybe that’s why our son never leaves messages – because he knows no one checks them.
  • Our daughter suggests that we text her rather than call her. Or at least email her, because she can pick her email up on her BlackBerry.
  • We do get better responses from our daughter and son when we text them.
  • My wife has a close friend who rarely returns phone calls. The only time you can get her on the phone is when they’re making plans for an upcoming get-together. Then the friend will call us, make the plan, and then get off the phone.

What’s it all about?

Some people may say this is all a bad sign, that maybe it has something to do with our AD/HD culture. Or maybe how we’re all paying less attention to each other. It certainly seems frustrating at times.  But let’s look a little deeper. I think it’s part of the spiritual evolution of our culture. Bear with me here.

Take the example of my wife’s girlfriend who we can’t reach by phone. When she’s here with us, we usually have her full attention – she’s not talking on the phone to anyone. And I think that’s the key to what’s going on here – we all seem to want to be paying more attention to what and who is right in front of us. We’re more interested in what we’re doing and who we’re doing it with. The flip side is we’re less willing to tolerate situations and people that we don’t want to experience. We’re increasing our attention on the here and now. While on one hand it seems it’s hard to get people to pay attention to us, it’s also true that they’re paying more intense attention when they are tuned in to your frequency.

How to get people to tune in to your frequency

The trick now may be how to get people to want to tune in to your frequency. Well, we all know the answer to that – be pleasant.

We no longer want to suffer people who can’t express themselves nicely. The bar has been raised and is continuing to rise. Don’t we expect people to speak respectfully, even when it’s a challenging topic? For some people, this has always been a requirement. Yet, my observation is there’s always been plenty of unpleasantness to go around, and there probably always will be. Yet, our ability to communicate clearly and pleasantly with the people with whom we’re close is seeming to become more important.

Why is it important?

It’s more important now than ever because our social structure is more fragile than ever. Here are some of the factors:

  • Closer integration – the world is indeed smaller than ever. Current communication mediums – television, telephone, mobile phone, internet, email, text messaging, Skype and video chat, and social networking such as Twitter and Facebook – now provide the ubiquitous ability to be always available and always in contact with people.
  • Economic instability – the current economic downturn exposes the vulnerability we all share. We are more dependent than ever on the people around us. As the systems break down, what’s left are the individual people. Your hometown banker may soon become important in your life once again.
  • Environmental instability – perhaps we’re just more keenly aware of it than ever before (due to the new communications mediums), but it sure seems like there’s a lot of natural (and man-made) disasters occurring. Earthquakes, plane crashes, terrorist attacks, hurricanes, storms that come out of nowhere, and monsoons have all been happening with intensity. Again, we may soon be looking to our neighbors for more help than we ever anticipated.
  • Political instability – we want our voices to be heard and we want our leaders to lead, not rule. We want them not only to lead, but to lead with integrity. The current upheaval in Iran is a sign of the times. The people our unwilling to deal with what seems to have been a fixed election, and a leadership in which they lack confidence.

Where does this leave us all? We may be turning to each other more in the future than we realize. And the social skills needed to get along with others, to be able to communicate clearly, effectively, and pleasantly will be needed skills. Each person’s survival may actually depend on these skills. These will be the tools we need to thrive in our changing world.

Check out the new Andreessen Horowitz Venture Capital Fund

July 6, 2009

Marc Andreessen and Ben Horowitz announced yesterday the creation of their new VC fund called Andreessen Horowitz. I think it’s a great name. 🙂 They have $300 million to invest in technology startups in chunks between $50,000 and $50,000,000.

You can read all about the new Andreessen Horowitz fund at Andreessen’s blog. The blog announcement is interesting because it goes into detail about their goals and philosophies on internet ventures and the industry. (No, it’s not boring…) Andreessen, born in 1971, literally invented the first web browser, Mosaic, while a student at the University of Illinois. When he went commercial with Mosaic, the name was changed to Netscape. Before Microsoft killed it (see Browser Wars on Wikipedia) Netscape was the most popular web browser. Netscape’s IPO made quite a number of people extremely rich.

Ben Horowitz has been Andreessen’s partner for 15 years. Andreessen created Ning, a professional social networking site (like LinkedIn, Facebook, Twitter, etc.) that is gaining popularity. Andreessen and Horowitz’s immediately prior venture, Opsware, was bought by Hewlett-Packard  in July 2007 – just before our latest economic crash – for $1.6 billion. He is currently on the boards of Facebook and eBay.

Andreessen is a major proponent and driving force in blogging.

Besides reading his blog, you can find our more about Andreessen on Wikipedia. Ben Horowitz has no Wikipedia page yet, but I bet he will soon.

Go Horowitz!