My event handler follows. I know it’s finding the license and merge document and making it to the doc.Save line. As you can see, I’m already using the form of the Save method you suggested.
Now, the part about permissions is more interesting. I have given full read/write permissions for my entire website to the “Network Services” user. Anything else I need?
BTW: The production server uses SSL.
Private Sub cmdReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdReport.Click
Dim oReportsCont As New ReportsController
Try
Dim oReportsInfo As ReportsInfo = oReportsCont.ReportsGet(CInt(cboReportType.SelectedValue))
Dim sRptPath As String = DotNetNuke.Common.Globals.ApplicationPath + REPORT_ROOT
Dim license As license = New license
license.SetLicense(Server.MapPath(sRptPath + "Aspose.Words.lic"))
Dim doc As Document = New Document(Server.MapPath(sRptPath + oReportsInfo.ReportLocation))
Dim builder As DocumentBuilder = New DocumentBuilder(doc)
Dim bookmarks As bookmarks = doc.Range.Bookmarks
Dim bookmark As bookmark
Dim iFacultyID As Integer = 0
If cboFaculty.Visible Then
iFacultyID = CInt(cboFaculty.SelectedValue)
End If
For Each bookmark In bookmarks
'builder.MoveToBookmark(bookmark.Name)
'builder.Font.Bold = True
'builder.Font.Color = System.Drawing.Color.Red
'builder.Write(bookmark.Name)
Select Case bookmark.Name
Case "FacultyName"
builder.MoveToBookmark("FacultyName")
builder.Font.Bold = True
builder.Write(cboFaculty.SelectedItem.Text)
' Faculty Review Bookmarks
Case "FacultyInfo"
AddFacultyInfo(builder, iFacultyID)
Case "StudySections"
AddStudySectionInfo(builder, iFacultyID)
Case "Grants"
AddGrantInfo(builder, iFacultyID)
Case "ClinicalActivities"
AddClinicalActivitiesInfo(builder, iFacultyID)
Case "Students"
AddStudentInfo(builder, iFacultyID)
Case "Recruits"
AddRecruitInfo(builder, iFacultyID)
Case "Departures"
AddDepartureInfo(builder, iFacultyID)
Case "Collaborations"
AddCollaborationInfo(builder, iFacultyID)
Case "Relationships"
AddRelationshipInfo(builder, iFacultyID)
Case "Editorships"
AddEditorshipInfo(builder, iFacultyID)
Case "Honors"
AddHonorInfo(builder, iFacultyID)
Case "Lectureships"
AddLectureshipInfo(builder, iFacultyID)
Case "Affiliations"
AddAffiliationInfo(builder, iFacultyID)
Case "Committees"
AddCommitteeInfo(builder, iFacultyID)
Case "Teachings"
AddTeachingInfo(builder, iFacultyID)
Case "Residents"
AddResidentInfo(builder, iFacultyID)
Case "ClinicalFellows"
AddClinicalFellowInfo(builder, iFacultyID)
Case "PostdoctoralFellows"
AddPostdoctoralFellowInfo(builder, iFacultyID)
Case "Presentations"
AddPresentationInfo(builder, iFacultyID)
Case "Publications"
AddPublicationInfo(builder, iFacultyID)
Case "Books"
AddBookInfo(builder, iFacultyID)
'Annual Report Bookmarks
Case "FacultyResearchInterests"
AddResearchInterestList(builder)
Case "StudySectionsList"
AddStudySectionsList(builder)
Case "PublicHealthServiceGrantList", "FederalGrantList", "LocalGrantList", "SocietyGrantList", "IndustryGrantList", "VAMCGrantList"
AddGrantsList(builder, bookmark.Name)
Case "GraduateResearchersList"
AddGraduateStudentsList(builder, True)
Case "NewRecruitsList"
AddNewRecruitsList(builder)
Case "IntramuralCollaborationsList", "ExtramuralCollaborationsList"
AddCollaborationsList(builder, bookmark.Name)
Case "RelationshipsList"
AddRelationshipsList(builder)
Case "EditorshipsHonorsEtcList"
AddEditorshipsHonorsEtcList(builder)
Case "TeachingHonorsList"
AddTeachingHonorsList(builder)
Case "UPMCResidentsList"
AddResidentsList(builder, False)
Case "OtherResidentsList"
AddResidentsList(builder, True)
Case "ClinicalFellowsList"
AddClinicalFellowsList(builder)
Case "PostdoctoralFellowsList"
AddPostdoctoralFellowsList(builder)
Case "GraduateStudentsList"
AddGraduateStudentsList(builder, False)
Case "FacultyTeachingList"
AddFacultyTeachingList(builder)
Case "InvitedPresentations"
AddInvitedPresentationsList(builder)
Case "ResearchFacultyList"
AddFacultyList(builder, True)
Case "ClinicalFacultyList"
AddFacultyList(builder, False)
Case "FacultyPublications"
AddPublicationsList(builder)
Case "FacultyChapters"
AddBookChaptersList(builder)
End Select
Next
doc.Save(oReportsInfo.ReportLocation, SaveFormat.Doc, SaveType.OpenInWord, Response)
Catch Ex As Exception
ProcessModuleLoadException(Me, Ex)
End Try
End Sub