Running the Beta 2 Samples Included with the Help Files

The Visual Studio Tools for Office Customer Solutions team works hard to create great samples that ship in the Help files for Visual Studio 2005. However, for Beta 2, a number of our samples will not run "out-of-the-box" and are not even available for download from the Help files. We will be fixing this for the final version of Visual Studio 2005, but for now, here are some "fixes" that will make the samples run.

 

First of all, you can download all of the sample files from the online version of the Help files. Be sure to make the unzipped files R/W before making the changes below.

 

Next, make these simple fixes to the sample projects in Visual Studio 2005 Tools for Office.

 

Accessing Data Sample

  • Set the Copy to Output Directory property of the AccessingData.xml file to Copy if newer.
  • Set the Copy to Output Directory property of the AccessingData.txt file to Copy if newer.
  • Copy the Access database, AccessingData.mdb, to your My Documents folder.
  • Remove the NTLM authentication from the Web service:
    1. Right-click the AccessingDataWebService project, and click Property Pages.
    2. Click Start Options.
    3. Clear the NTLM Authentication check box in the Server section.
    4. Click OK.
  • Create a SQL Server database named AccessingData with a table named Names which has two fields, GivenName and FamilyName. Add data to the table.
  • Create a stored procedure in the AccessingData table named GetNames which returns two fields, GivenName and FamilyName. You can create the stored procedure with the follow SQL:

CREATE PROCEDURE GetNames AS Select * from Names

Actions Pane Help Label Sample

  • For the ExcelHelpLabelExample and WordHelpLabelExample solutions to use the ActionsPaneHelpLabel libray, its compiled DLL needs to be given FullTrust permissions using caspol.exe.

For example, if you installed the ActionsPaneHelpLabel solution to the My Documents\Visual Studio 2005\Projects folder, you can run the following command to trust the ActionsPaneHelpLabel DLL in the ExcelHelpLabelExample solution:

caspol -u -ag All_Code -url "C:\Documents and Settings\user\My Documents\Visual Studio 2005
\Projects\ActionsPaneHelpLabel\ExcelHelpLabelExample\bin\ActionsPaneHelpLabel.dll" FullTrust
-n "ActionsPaneHelpLabeler"

Run this command from the Visual Studio 2005 Command Prompt and replace user with your username.

Data Caching Sample

  • Set the Copy to Output Directory property of the SurveysDataSet.xsd file to Copy if newer in both the DataCachingCS and DataCachingWinform projects.
  • There is a bug in the DataCachingCS project which prevents the data in the survey listboxes from being saved to the data source. When you run the DataCachingWinform project, you will get a ConstraintException because some fields contain null values. You can ignore this exception and continue to run the application.

Master Detail Data Sample

  • Set the Copy to Output Directory property of the data.xml file to Copy if newer.

PowerPoint Deck Generator Sample

  • Set the Copy to Output Directory property of the presentation.xsd file to Copy if newer.

PowerPoint Script Generator Sample

- Set the Copy to Output Directory property of the Presentation.xsd file to Copy if newer.

 

--Janet Robinson, Visual Studio Tools for Office Customer Solutions team

-----
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.