MOD2000: PublishCurrentWeb Code from Code Librarian Does Not Compile (259632)
The information in this article applies to:
- Microsoft Office 2000 Developer
This article was previously published under Q259632 SYMPTOMS
When you copy the code example PublishCurrentWeb from the Code Librarian and paste it into the Visual Basic Editor, you notice that the fourth line of code appears in red. If you compile the code, you receive the following error message:
Compile Error:
Syntax Error
CAUSE
A parenthesis is missing at the end of the fourth line of code after "my password."
RESOLUTION
Add a closing parenthesis after "my password," as shown in the following example:
Sub PublishCurrentWeb()
Dim sTargetURL As String
sTargetURL = "http://localhost/mynewweb"
Call ActiveWeb.Publish(sTargetURL, fpPublishAddToExistingWeb + _
fpPublishIncremental, Application.UserName, "mypassword")
End Sub
STATUSMicrosoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 7/31/2001 |
---|
Keywords: | kbbug kbCodeLibrarian kbdocerr kberrmsg KB259632 |
---|
|