asp.netPRO The .NET and Java component publisher



Subscription Services
Print Subscription
Online-Only Subscription
Renew Subscription
asp.netNOW Newsletter
Change of Address
Pay An Invoice
Subscription Packages

asp.netPRO
Articles
411asp.net Directory
New Products
Book Reviews
Blog Listings  
E-Newsletter Articles- NEW
Events  - NEW 
Job Listings  
Product Reviews
Opinion
Back Issues
Reprints/E-prints
Search

Downloads
Premium Downloads


Informant
Contact Us
Advertise with Us
Write For Us




San Francisco Workshops
 
 
 

Return to tip form

Sample Tip #1

In Access, it's all too easy for a form's Properties window to lose track of event procedures. For example, if you add an event procedure from within the form's module (instead of starting from the form's Properties window), you'll often come back to Access, run the form, and find that Access doesn't run your code. It won't, unless it finds the magic words "[Event Procedure]" in the event property associated with the code you just wrote.

Although you can simply go to each event property and select "[Event Procedure]" from the list, if you have a number of these, it's a lot of work. There's an easier way:

  1. Open the module in the code editor.
  2. Select all the code in the module.
  3. Cut (Ctrl+X) the code to the clipboard.
  4. Immediately paste (Ctrl+V) the code right back into the same module.

Following these steps "rehooks" all the event procedures with the associated event property.
-- Ken Getz

Sample Tip #2

I use PowerPoint a great deal, and often want to include URLs as part of a presentation. PowerPoint 2000, however, always wants to convert anything that looks like a URL into a hyperlink in the slide. It uses the standard colors associated with hyperlinks, which may conflict with my design scheme. And, to be honest, I have seldom needed a live hyperlink from a PowerPoint slide.

If there's an option to have PowerPoint 2000 not do this, I've not been able to find it. In each case, I've selected the offending hyperlink and used the context menu and its Hyperlink option to remove the hyperlink. This is awfully tedious for a page with several links on it.

The last time I came across this, I'd had enough. I wrote the following code fragment to remove all the links on the current page:

    Public Sub ClearHyperlinks()
        ' Remove all hyperlinks from the current slide.
        dim hyp As Hyperlink

        With ActiveWindow.Selection.SlideRange
            For Each hyp In .Hyperlinks
                hyp.Delete
            Next hyp
        End With
    End Sub

Given the code, it occurred to me that I might want to remove all links in the entire document. That modification was simple, and ended up looking like this:

    Public Sub ClearAllHyperlinks()
        ' Remove all hyperlinks from all slides.
        dim sld As Slide
        dim hyp As Hyperlink

        For Each sld In ActivePresentation.Slides
            For Each hyp In sld.Hyperlinks
                hyp.Delete
            Next hyp
        Next sld
    End Sub

That did the trick! Although the only way I can see to make this available to all presentations is to wrap it up in a COM Add-in for PowerPoint, that's easy enough to do if you're determined. Hopefully, these fragments will give you enough to get you started.
-- Ken Getz


Register By August 15th and save $200.00

.NET Pro VPS

2008 Fall Conference in Las Vegas

2007 asp.netPRO Complete Works CD
Co-Sponsored by:
Download your free trial now!

Click here for the online product directory, asp.netPRO Product Portal



Got A Hot Tip?


Share your ASP.NET tip, get a FREE 2005 asp.netPRO Complete Works CD-ROM!



Site Survey

I have the following certifications

SUN Certified Java Programmer
Microsoft MCAD/MCSD/MCDBA
IBM Certified Developer
Other certification
No certification

View Results
View Past Surveys


Downloads


  Recent Favorites
 •

SMS Text messaging for ASP.NET

 •

ChartDirector Chart Component

 •

Dundas Software Offers Dundas Chart for .NET


  Go to...
 • Article files
 • Third-party files
 • Upload a file



Microsoft Internet Explorer
Top of page

Register By August 15th and save $200.00

The .NET and Java component publisher


Informant Communications Group

Informant Communications Group, Inc.
5105 Florin Perkins Road
Sacramento, CA 95826
Phone: (916) 379-0609 • Fax: (916) 379-0610

Copyright © 2008 Informant Communications Group. All Rights Reserved. • Site Use Agreement • Send feedback to the Webmaster • Important information about privacy