Page 323 of 727« First...102030...321322323324325...330340350...Last »

ACC97: Graph 97 Chart Object Does Not Update Display Correctly

When you add a graph to a report and link its data to a field in the
report, the graph is not updated from one record to the next when you
view or print the report.
Microsoft Access 97 is not requerying the LinkChildFields and
LinkMasterFields properties in the chart object.
If the graph is based on a saved query, open that query in Design view;
add the field displayed in the LinkMasterFields and LinkChildFields
properties of the graph to that query.

If the graph is based on an SQL statement, move the field in the
LinkMasterFields and LinkChildFields properties of the graph to a field
with a WHERE clause in the graph’s RowSource property. The following
example uses the Sales By Category report in the sample database
Northwind.mdb to show you how to do this.

CAUTION: Following the steps in this example will modify the sample
database Northwind.mdb. You may want to back up the Northwind.mdb file
and perform these steps on a copy of the database.

  1. Start Microsoft Access 97 and open the sample database Northwind.mdb.
  2. Open the Sales By Category report in Design View.
  3. If the properties sheet is not already displayed, click Properties on
    the View menu.
  4. Select the graph in the CategoryName Header section of the report.
  5. Note that the graph’s LinkChildFields property is set to CategoryID;
    this will become a new field in the graph’s RowSource. Note that the
    graph’s LinkMasterFields property is also set to CategoryID; this will
    be used as a WHERE clause in the graph’s RowSource.
  6. Clear the LinkChildFields and LinkMasterFields properties.
  7. Using the right mouse button (right-click), click the graph’s RowSource
    property, and then click Build on the shortcut menu that appears.
  8. In the Query Builder, drag the CategoryID field to the QBE grid. This
    represents the LinkChildFields property.
  9. Change the Total row of the CategoryID field from Group By to Where,
    and then type the following expression in the Criteria row:

    Reports!Sales by Category!CategoryID

    This represents the LinkMasterFields property.

  10. Close the Query Builder window and save the changes.
  11. Save the Sales By Category report, and then close it.
  12. Preview the Sales By Category report and note that the information in
    the graph corresponds to the Product and Sales data on each page of the
    report.
Microsoft has confirmed this to be a problem in Microsoft Access 97.

If the graph is based on an SQL statement, this behavior does not
occur in Microsoft Access 97 Service Release 1. However, if the
graph is based on a saved query and you are using Microsoft
Access 97 Service Release 1, you must still add the field shown
in the LinkChildFields and LinkMasterFields properties of the
graph to the query.

NOTE: To update your copy of Microsoft Access 97 to Service Release 1,
download Microsoft Office Service Release 1 from Microsoft’s Web site at
the following address:

For more information about the LinkChildFields and LinkMasterFields
properties, search the Help Index for “LinkChildFields property” or
“LinkMasterFields property.”

Article ID: 165836 – Last Review: July 23, 2012 – Revision: 4.0


Applies to
  • Microsoft Access 97 Standard Edition
kbdownload kbbug kbui KB165836
Retired KB Content Disclaimer

This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered “as is” and will no longer be updated.

Continue reading here:
ACC97: Graph 97 Chart Object Does Not Update Display Correctly

ACC97: "Name Conflicts…" Error When Opening Replica

When you try to open a replica, you may receive the following error message

Name conflicts with existing module, project or object library.

and you are unable to open the replica.

A conflict is preventing Microsoft Access from compiling and saving the
replica’s Visual Basic for Applications project.

The first time you open a replica following synchronization, Microsoft
Access automatically compiles and saves the replica’s Visual Basic for
Applications project. In the Design Master, you cleared the Replicable
property on a module’s property sheet, and then synchronized with the
replica. However, an error prevented Microsoft Access from updating the
replica’s project. So, although the module no longer appeared in the
replica, it had not been removed from the project. You then opened the
Design Master, made the module replicable again, and synchronized with the
replica. You receive the error because Microsoft Access is attempting to
update the project again; however, it is now attempting to add a module to
the project that is already there.

Open the Design Master and make the modules unreplicable. After
synchronization, you can open the replica. If you want the modules to be
transferred to the replica during synchronization, rename them.
Microsoft has confirmed this to be a problem in Microsoft Access 97. This
problem no longer occurs in Microsoft Access 97 Service Release 1.

NOTE: Stand-alone Microsoft Access 97 Service Release 1 is not currently
available, but you can update your copy of Microsoft Access 97 to Service
Release 1 by downloading Microsoft Office Service Release 1 from
Microsoft’s Web site at:

For more information about problems with projects in replicas, please see
the following article in the Microsoft Knowledge Base:

171207

(http://support.microsoft.com/kb/171207/EN-US/
)

Removing Replicated Module Causes Automation Error

Article ID: 172162 – Last Review: July 23, 2012 – Revision: 4.0


Applies to
  • Microsoft Access 97 Standard Edition
kbdownload kbbug kberrmsg KB172162
Retired KB Content Disclaimer

This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered “as is” and will no longer be updated.

Read more here:
ACC97: "Name Conflicts…" Error When Opening Replica

ACC97: Error When Clicking Page Link in Report Exported to HTML

When you export a report to HTML format, and then view the report in
your Web browser, you may receive one of the following error messages
when you click on one of the page links:

HTTP/1.0 500 Server Error (161)

You edited a template in Microsoft FrontPage, and then you used that
template when you exported the report to HTML.
After you have edited the template in Microsoft FrontPage, open it in a
text editor, such as Notepad. In the tokens that create the navigation
links, replace any instance of the string “%3c” with the character “” as well.
For example, change

First
Previous
Next
Last

to:

“>Previous
“>Last

After you have saved the edited template, export the report to HTML again.

You can also edit the HTML files to which the report was exported and add
the hyperlinks that allow you to move to different pages. For example, on
the first page of the exported report, the navigation hyperlinks would be:

First
Previous
Next
Last

However, this method is not recommended because it is inconvenient if the
report contains more than a few pages.

Microsoft has confirmed this to be a problem in Microsoft Access 97. This
problem no longer occurs in Microsoft Access 97 Service Release 1.

NOTE: Stand-alone Microsoft Access 97 Service Release 1 is not currently
available, but you can update your copy of Microsoft Access 97 to Service
Release 1 by downloading Microsoft Office Service Release 1 from
Microsoft’s Web site at:

For more information about navigation links in templates, please see the
following article in the Microsoft Knowledge Base:

164007

(http://support.microsoft.com/kb/164007/EN-US/
)

Reports Exported to HTML Have No Page Links

Article ID: 172287 – Last Review: July 23, 2012 – Revision: 4.0


Applies to
  • Microsoft Access 97 Standard Edition
  • Microsoft FrontPage 97 Standard Edition
  • Microsoft FrontPage 1.0 Standard Edition
  • Microsoft FrontPage 1.1 Standard Edition
kbdownload kbbug kberrmsg KB172287
Retired KB Content Disclaimer

This article was written about products for which Microsoft no longer offers support. Therefore, this article is offered “as is” and will no longer be updated.

Excerpt from:
ACC97: Error When Clicking Page Link in Report Exported to HTML

A SQL Server Timeout may occur when changing a name field for a Microsoft Dynamics CRM User

An Administrator is unable to make changes to a user record in Microsoft Dynamics CRM 2011 and receives a generic SQL Server error message. 
This can be caused by the user owning a high number of related records that need to be updated in the ActivityPartyBase table in the Microsoft Dynamics CRM organization database
Increase the HKLMSoftwareMicrosoftMSCRMOLEDBTimeout to a higher value either on a temporary basis or permanent basis on the Microsoft Dynamics CRM Server.

Create or change the OleDbTimeout value

  1. In Registry Editor, locate and then click the following registry subkey: HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM
  2. Double-click the OleDbTimeout value

    Note If the OleDbTimeout value does not exist, create an OleDbTimeout value. To do this, follow these steps:

    1. Right-click MSCRM, point to New, and then click DWORD value
    2. Type OleDbTimeout
  3. In the Edit DWORD Value dialog box, click Decimal, type 600 in the Value data field, and then click OK.

    Note The value of 600 represents 600 seconds. By default, the value is 30 seconds. Also note that if required on a temporary basis to allow this operation to complete, you may need to set this to 86400 which is equivalent to a value of 24 hours.

NOTE: It’s recommended to run with the OLDDBTimeout setting set to a value between 30 to 600 decimal as a best practice to help minimize excessive SQL Blocking that a long running or expensive query may cause.

Note This is a “FAST PUBLISH” article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use

(http://go.microsoft.com/fwlink/?LinkId=151500)

for other considerations.

Article ID: 2637855 – Last Review: July 20, 2012 – Revision: 2.0


Applies to
  • Microsoft Dynamics CRM 2011

View article:
A SQL Server Timeout may occur when changing a name field for a Microsoft Dynamics CRM User

An error occurs when trying to schedule activities in Microsoft Dynamics CRM: "An unhandled exception occurred"

After removing either the Site or Customers fields from the Service Activity form, the following error will occur when trying to schedule activities:

Microsoft CRM Error Report:
Error Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Error Details:
Exception of type ‘System.Web.HttpUnhandledException’ was thrown.

Full Stack:
KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Microsoft.Crm.Application.Dialogs.SM.ActivitySchedulingDialog.SetCustomizableLabel(FormDescriptor formDescriptor, EntityMetadata serviceActivityMetadata, String attributeName, FormCell formCell)
   at Microsoft.Crm.Application.Dialogs.SM.ActivitySchedulingDialog.SetCustomizableLabels()
   at Microsoft.Crm.Application.Dialogs.SM.ActivitySchedulingDialog.ConfigureForm()
   at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
   at System.Web.UI.Control.PreRenderRecursiveInternal()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

HttpUnhandledException: Exception of type ‘System.Web.HttpUnhandledException’ was thrown.
   at System.Web.UI.Page.HandleError(Exception e)
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
   at System.Web.UI.Page.ProcessRequest()
   at System.Web.UI.Page.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
 

The Site and Customer fields are required by the Scheduling engine to be on the Service Activity form
Add the Site and Customers fields back to the Service Activity form and publish customizations
Note This is a “FAST PUBLISH” article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use

(http://go.microsoft.com/fwlink/?LinkId=151500)

for other considerations.

Article ID: 2671357 – Last Review: July 20, 2012 – Revision: 2.0


Applies to
  • Microsoft Dynamics CRM 2011
  • Microsoft Dynamics CRM 4.0
kbmbsmigrate kbsurveynew KB2671357

More:
An error occurs when trying to schedule activities in Microsoft Dynamics CRM: "An unhandled exception occurred"

"ODBC–call failed" error when you open a table that is linked to a SQL Database instance in Access 2010

Consider the following scenario:
  • A table has lots of records in a Windows Azure SQL Database instance.
  • The table is added as a linked table in Microsoft Access 2010.
  • You try to open the linked table in Access 2010.

In this scenario, you receive an error message that resembles the following:

ODBC–call failed: MicrosoftSQL Server Native Client 11.0TCP Provider: An existing connection was forcibly closed by the remote host (#10054) MicrosoftSQL Server Native Client 11.0Communication link failure (#10054)

Note This issue may also occur when you try to open the linked table from other applications that are connected to the SQL Database instance table by using Microsoft Open Database Connectivity (ODBC).

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the “Applies to” section.
To work around this issue, use one of the following methods:
  • Click Last record as soon as the table is opened in order to display all records in the linked table in the Datasheet View of Access 2010.
  • Do not select all records in the linked table to be displayed. Instead, select only a limited number of records.
For more information about Access 2010 and SQL Database (referred to as SQL Azure on this blog), go to the following Microsoft Office blog:For more information about query performance in an Access database, click the following article number to view the article in the Microsoft Knowledge Base:
209126

(http://support.microsoft.com/kb/209126/
)

Information about query performance in an Access database

Article ID: 2730109 – Last Review: July 20, 2012 – Revision: 6.0


Applies to
  • Microsoft Access 2010
  • Microsoft SQL Azure Database
kbsurveynew kbtshoot kbprb KB2730109

More:
"ODBC–call failed" error when you open a table that is linked to a SQL Database instance in Access 2010

How to set custom AutoCorrect settings by configuring a system policy in Office XP

This article was previously published under Q313092

AutoCorrect is a feature that corrects common mistakes as
you type them in many Office documents. You can control the behavior of
AutoCorrect by configuring a system policy.

Microsoft Access 2002,
Excel 2002, PowerPoint 2002, and Word 2002 all use the AutoCorrect feature to
automatically correct common typing mistakes, such as incorrect capitalization.
Although users can control their own AutoCorrect settings within individual
Office programs, you can apply custom settings to groups of users with a system
policy.

Customizing the Behavior of AutoCorrect in Microsoft Access, Excel, and PowerPoint

The System Policy Editor enables you to use the templates that
are provided with the Microsoft Office XP Resource Kit to enforce system policies globally for users of Office on a
network. By using system policies, an administrator can quickly enforce a user
configuration on users’ computers when users, groups, or computers log on to
the network.

The Microsoft Office policy templates (ADM files)
describe all of the policy settings that you can set for Office. You can use
these ADM files with the System Policy Editor and Group Policy snap-in tools in
Microsoft Windows operating systems to apply policies to users’ computers.

  1. Obtain the System Policy Editor from the Office XP Resource Kit, which is located at the following Microsoft Web site: On the Web site, click ORKTools.exe. You will be prompted to choose either Open or Save. If you select Open, the ORK Tools will be installed. If you select Save, browse to a location to save the tools file. After the file is
    saved to the location that you specify, double-click Orktools.exe, and then follow the installation instructions on
    screen.
  2. To locate the System Policy Editor, click Start, point to Programs, point to Microsoft Office Tools, point to Microsoft Office XP Resource Kit Tools, and then click System Policy Editor. By default, the policy templates (ADM files) are installed in
    the WindowsINF folder or WINNTINF folder on your computer.
  3. In the System Policy Editor, click Options and then click Policy Templates. In the Policy Templates Options, click Add. In Open Template File, browse to the WINNTINF folder. Click to select Office10.adm, click Open, and then click OK.
  4. In the System Policy Editor, select File and then point to New Policy. Double-click the Default User icon.
  5. Click to expand the Microsoft Office XP node.
  6. Click to expand the Tools | AutoCorrect Options (Excel, PowerPoint, and Access) node.

    NOTE: If the AutoCorrect policies are enabled, the registry key will
    contain the DWORD value for each of the policies that is enabled. Examine the
    following registry key:

    HKEY_CURRENT_USERSoftwarePoliciesMicrosoftOffice10.0CommonAutoCorrect

    Select all or any of the following policies:

    • Select the Show AutoCorrect Options
      buttons
      check box.

      To enforce the policy:

      Under
      Settings for Show AutoCorrect Options buttons, select the
      Check to enforce setting on; uncheck to enforce setting off
      check box.

    • Select the Correct TWo INitial
      CApitals
      check box.

      To enforce the policy:

      Under
      Settings for Correct TWo INitial CApitals, select the
      Check to enforce setting on; uncheck to enforce setting off
      check box.

    • Select the Capitalize first letter of
      sentence
      check box.

      To enforce the policy:

      Under
      Settings for Capitalize first letter of sentence, select the
      Check to enforce setting on; uncheck to enforce setting off
      check box.

    • Select the Capitalize names of days
      check box.

      To enforce the policy:

      Under Settings
      for Capitalize names of days
      , select the Check to enforce
      setting on; uncheck to enforce setting off
      check box.

    • Select the Correct accidental use of cAPS LOCK
      key
      check box.

      To enforce the policy:

      Under
      Settings for Correct accidental use of cAPS LOCK
      key
      , select the Check to enforce setting on; uncheck to
      enforce setting off
      check box.

    • Select the Replace text as you type
      check box.

      To enforce the policy:

      Under Settings
      for Replace text as you type
      , select the Check to enforce
      setting on; uncheck to enforce setting off
      check box.

Customizing the Behavior of AutoCorrect in Word

  1. Obtain the System Policy Editor from the Office XP Resource Kit, which is located at the following Microsoft Web site: On the Web site, click ORKTools.exe. You will be prompted to choose either Open or Save. If you select Open, the ORK Tools will be installed. If you select Save, browse to a location to save the file. After the file is saved
    to the location that you specify, double-click Orktools.exe, and then follow the installation instructions on
    screen.
  2. The System Policy Editor is installed from the Office XP Resource Kit. To locate the tool, click Start, point to Programs, point to Microsoft Office Tools, point to Microsoft Office XP Resource Kit Tools, and then click System Policy Editor. By default, the policy templates (ADM files) are installed in
    the WindowsINF folder or WINNTINF folder on your computer.
  3. In the System Policy Editor, click Options, and then click Policy Templates. In the Policy Templates Options, click Add. In Open Template File, browse to the WINNTINF folder. Click Word10.adm, click Open, and then click OK.
  4. In the System Policy Editor, click File, and then point to New Policy or click the New icon. Double-click the Default User icon.
  5. Click to expand the Microsoft Word 2002 node.
  6. Under the Microsoft Word 2002 node, click to expand the Tools | AutoCorrect node.
  7. Click to expand the AutoCorrect node.

    NOTE: If the AutoCorrect policies are applied, the registry key will
    contain the DWORD value for each of the policies that is enabled. Examine the
    following registry key:

    HKEY_CURRENT_USERSoftwarePoliciesMicrosoftOffice10.0WordOptionsvpref

    Select all or any of the following policies:

    • Select the Correct
      keyboard setting
      check box.

      To
      enforce the policy:

      Under Settings for Correct
      keyboard setting
      , select the Check to
      enforce setting on; uncheck to enforce setting off
      check
      box.

    • Select the Correct TWo INitial
      CApitals
      check box.

      To enforce the policy:

      Under
      Settings for Correct TWo INitial CApitals, select the
      Check to enforce setting on; uncheck to enforce setting off
      check box.

    • Select the Capitalize first letter of
      sentence
      check box.

      To enforce the policy:

      Under
      Settings for Capitalize first letter of sentence, select the
      Check to enforce setting on; uncheck to enforce setting off
      check box.

    • Select the Capitalize names of days
      check box.

      To enforce the policy:

      Under Settings
      for Capitalize names of days
      , select the Check to enforce
      setting on; uncheck to enforce setting off
      check box.

    • Select the Correct accidental use of cAPS LOCK
      key
      check box.

      To enforce the policy:

      Under
      Settings for Correct accidental use of cAPS LOCK
      key
      , select the Check to enforce setting on; uncheck to
      enforce setting off
      check box.

    • Select the Replace text as you type
      check box.

      To enforce the policy:

      Under Settings
      for Replace text as you type
      , select the Check to enforce
      setting on; uncheck to enforce setting off
      check box.

REFERENCES

The following Microsoft Office XP Resource Kit Web site provides assistance in applying the System Policies:

Article ID: 313092 – Last Review: July 20, 2012 – Revision: 1.0


Applies to
  • Microsoft Office XP Small Business Edition
  • Microsoft Office XP Standard Edition
  • Microsoft Office XP Developer Edition
  • Microsoft Access 2002 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft FrontPage 2002 Standard Edition
  • Microsoft Outlook 2002 Standard Edition
  • Microsoft PowerPoint 2002 Standard Edition
  • Microsoft Word 2002
kbhowto kbhowtomaster KB313092

Other Support Sites

Community

Get Help Now

Article Translations

Related Office XP Web Sites

Read the original:
How to set custom AutoCorrect settings by configuring a system policy in Office XP

After exporting Microsoft Dynamics CRM 2011 Dynamic Worksheets and/or Dynamic Pivot Tables using Claims Authentication, users do not see the expected data within the Excel worksheet

After exporting Microsoft Dynamics CRM 2011 Dynamic Worksheets and/or Dynamic Pivot Tables using Claims Authentication, users do not see the expected data within the Excel worksheet.

Users may see one of two things within the Excel Worksheet:
1. When using IFD Claims Authentication, users will see the ADFS sign-in page.
2. When using claims authentication, users will get a message stating:
“Script is disabled. Click Submit to continue”

Cause 1
Exporting the Dynamic Worksheet and/or Dynamic Pivot Table using Internet Explorer.

Cause 2
After export the Dynamic Worksheet and/or Dynamic Pivot Table using the Microsoft Dynamics CRM 2011 for Microsoft Office Outlook client, users did not refresh the data.

Resolution 1
Dynamic Worksheets and/or Dynamics Pivot Tables require the use of the Excel addin which is part of the Microsoft Dynamics CRM 2011 for Microsoft Office Outlook client. You must install the Microsoft Dynamics CRM 2011 for Microsoft Office Outlook found here:
http://www.microsoft.com/en-us/download/details.aspx?id=27821

(http://www.microsoft.com/en-us/download/details.aspx?id=27821)

Resolution 2
After exporting the Dynamic Worksheets and/or Dynamics Pivot Tables refresh the data.
a. Export the Dynamic Worksheets and/or Dynamics Pivot Tables from Microsoft Dynamics CRM 2011.
b. Open up the Dynamic Worksheets and/or Dynamics Pivot Tables with Excel.
c. Within Excel, click on Data tab.
d. Click on Refresh from CRM button.

You can workaround the requirement of using the Microsoft Dynamics CRM 2011 for Microsoft Office Outlook client by going through the following:
1.  Export the Dynamic Worksheets and/or Dynamics Pivot Tables from Microsoft Dynamics CRM 2011.
2.  Open up the Dynamic Worksheets and/or Dynamics Pivot Tables with Excel.
3. After the ADFS sign in page or the “Script is disabled” error shows in the worksheet, click on Data tab.
4. Click on Connections.
5. Within Workbook Connections, click on Properties.
6. Within Connection Properties, click on Definition tab.
7. Click on Edit Query button.
8.  Within the Edit Web Query, window you will need to do one of the following:
     - Using IFD Claims authentication, the Edit Web Query will redirect to ADFS login, enter in the user’s credentials and click on Sign In.
     - Using Claims authentication, continue to step 9.
9. After getting the Microsoft Dynamics CRM error, click on OK.
10. Within Edit Web Query, click on Cancel.
11. Within Connection Properties, click on Cancel.
12. Within Workbook Connections, click on Close.
13. Within Excel > Data tab, click on Refresh All.

Note: These steps are required every time you close and re-open the Dynamic Worksheets and/or Dynamics Pivot Tables.

Note This is a “FAST PUBLISH” article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use

(http://go.microsoft.com/fwlink/?LinkId=151500)

for other considerations.

Article ID: 2556284 – Last Review: July 19, 2012 – Revision: 3.0


Applies to
  • Microsoft Dynamics CRM 2011
kbmbsmigrate kbsurveynew KB2556284

Visit link:
After exporting Microsoft Dynamics CRM 2011 Dynamic Worksheets and/or Dynamic Pivot Tables using Claims Authentication, users do not see the expected data within the Excel worksheet

How To Use JScript or JavaScript to Traverse Through a Collection

This article describes how to use server-side scripts on Active Server Pages (ASP) pages with Visual Basic Script (VBScript) and JScript or JavaScript to traverse through a collection. In VBScript, you can use the FOR EACH…NEXT loop to traverse through a collection. In JScript or JavaScript, you must use an enumerator object.
The examples in this article use the file system object to traverse a folder (in this case, C:Text) and list all the files located in the folder. The first example uses a FOR EACH…NEXT loop in VBScript to traverse:

  1. Create a new folder in the root folder of drive C and name it “Text”.
  2. Place five text files in the directory you just created.
  3. Create a new ASP page and add the following VBScript code:
<% @LANGUAGE="VBScript" %>
<%
	'Reference the FileSystemObject
	set FSO = Server.CreateObject("Scripting.FileSystemObject")

	'Reference the Text directory
	set Folder = FSO.GetFolder("C:Text")

	'Reference the File collection of the Text directory
  	set FileCollection = Folder.Files

	Response.Write("VBScript Method
") 'Display the number of files within the Text directory Response.Write("Number of files found: " & FileCollection.Count & "
") 'Traverse through the FileCollection using the FOR EACH...NEXT loop For Each FileName in FileCollection strFileName = FileName.Name Response.Write(strFileName & "
") Next 'De-reference all the objects set FileCollection = Nothing set Folder = Nothing set FSO = Nothing %>

The following example demonstrates the equivalent but uses JScript or JavaScript and the enumerator object as shown below. Follow the steps outlined previously, except use the following code in step 3.

<% @LANGUAGE="JScript" %>
<%
	// Reference the FileSystemObject
	var FSO = Server.CreateObject("Scripting.FileSystemObject");

	// Reference the Text directory
	var Folder = FSO.GetFolder("c:Text");

	// Reference the File collection of the Text directory
  	var FileCollection = Folder.Files;

	Response.Write("JScript Method
"); // Display the number of files within the Text directory Response.Write("Number of files found: " + FileCollection.Count + "
"); // Traverse through the FileCollection using the FOR loop for(var objEnum = new Enumerator(FileCollection); !objEnum.atEnd(); objEnum.moveNext()) strFileName = objEnum.item(); Response.Write(strFileName + "
"); // Destroy and de-reference enumerator object delete objEnum; objEnum = null; // De-reference FileCollection and Folder object FileCollection = null; Folder = null; // Destroy and de-reference FileSystemObject delete FSO; FSO = null; %>

NOTE: The enumerator object is instantiated within the FOR loop, which is okay in JScript or JavaScript. The syntax for the FOR statement is as follows:

FOR(initialize ; test ; increment)
statement;

The output for each example in this article will appear differently. In VBScript, the output shows only the file name and its file extension as shown here:

VBScript Method
Number of files found: 5
test1.txt
test2.txt
test3.txt
test4.txt
test5.txt
					

In JScript or JavaScript, the output displays the physical folder, the file name, and its file extension:

JScript Method
Number of files found: 5
C:Texttest1.txt
C:Texttest2.txt
C:Texttest3.txt
C:Texttest4.txt
C:Texttest5.txt
					

The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

For more information on JScript and VBScript, please refer to the Microsoft Scripting

(http://technet.microsoft.com/library/ee176792.aspx)

Web site.

Article ID: 229693 – Last Review: July 19, 2012 – Revision: 3.0


Applies to
  • Microsoft Active Server Pages 4.0
  • Microsoft Internet Information Server 4.0
kbfso kbhowto kbscript KB229693

Continue reading here:
How To Use JScript or JavaScript to Traverse Through a Collection

OFFXP: Some Switches and Properties Are Ignored When Using the /j Switch

When you run Office Setup by using a command line that includes the /j switch (/jm or /ju), some command-line properties or switches are ignored. For example, some switches are ignored if you use the following command line to start Setup

pathSetup.exe /jm PackageName.msi companyname=”My Company” /le c:Officelog.txt

where path is the location of the installation point and PackageName.mst is the name of the Windows Installer .msi package
(for example, Proplus.msi).

When you first start an Office program a dialog box appears showing you user information. The Organization name box will not contain the company name you specified on the command line (for example, My Company). However, the Officelog.txt file will be created on the root of the C: drive.

NOTE: You will not see any notification that the switches or properties are being ignored.

When you run Setup using the /j switch, only a few command-line switches are applied during Setup. The following table lists the switches that are not ignored when you use the /j switch:

   Switch           Function
   -----------------------------------------------------------------------
   /wait            Setup.exe waits for Msiexec.exe to complete before
                    terminating.

   /settings        Used to specify an alternative file to the default
                    Setup.ini file.

   /l               Used to specify logging options. Must also include a
                    path to the log file.

   /q               Used to run Setup in Quiet mode.

   /autorun         Used to indicate that Windows runs Setup automatically
                    when you insert the Office CD into the CD-ROM or
                    DVD-ROM drive.
				
For a complete description of the command-line switches and properties for Office, see the following Microsoft Web site:

You can also download supplemental information (Orkdocs.exe) from the following Microsoft Web site:

After you download the Orkdocs.exe file, double-click it to extract the files. The Setupref.doc file comtains a complete list of the Setup command-line switches and properties.

Article ID: 297898 – Last Review: July 19, 2012 – Revision: 2.0


Applies to
  • Microsoft Office XP Professional Edition
  • Microsoft Office XP Small Business Edition
  • Microsoft Office XP Standard Edition
  • Microsoft Office XP Developer Edition
  • Microsoft Access 2002 Standard Edition
  • Microsoft Excel 2002 Standard Edition
  • Microsoft FrontPage 2002 Standard Edition
  • Microsoft Outlook 2002 Standard Edition
  • Microsoft PowerPoint 2002 Standard Edition
  • Microsoft Word 2002

Read the original:
OFFXP: Some Switches and Properties Are Ignored When Using the /j Switch

Page 323 of 727« First...102030...321322323324325...330340350...Last »

Recent Comments

    Archives

    Categories