Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
ViewCmd opening up Word instead of Worksite Viewer
TheSaint
Hi all,
We have created our own tree view to browse thru the folders and documents, and added the options to view and print the selected document.
This was all working fine untill we upgraded to Worksite 8.2 SP 1 Patch 6.
Before the upgrade we were on Worksite 8.2 SP1 Patch 4
When I execute the Viewcmd it opens up the docuemnt in Word and then prints it !!!! This is meant to open up Worksite Viewer, it did with the old version.
Code is below. Please help.
Public Sub ViewDocument(pNrtDoc As NRTDocument, hwnd As Long)
On Error GoTo ErrCatch
Dim pViewCmd As IMANEXTLib.ViewCmd
Dim pContextItems As IMANEXTLib.ContextItems
Dim PArrDox(0) As IManage.NRTDocument
'Crete new context items
Set pContextItems = New IMANEXTLib.ContextItems
'Create a new view command object
Set pViewCmd = New IMANEXTLib.ViewCmd
'Attach the document we want to view
Set PArrDox(0) = pNrtDoc
pContextItems.Add "ParentWindow", hwnd
pContextItems.Add "SelectedNRTDocuments", PArrDox
Dim tmpPath As String
tmpPath = "C:\Temp\"
pContextItems.Add "TemporaryDirectory", tmpPath
pViewCmd.Initialize pContextItems
pViewCmd.Update
If pViewCmd.Status = 0 Then
pViewCmd.Execute
Dim pRefresh As Boolean
pRefresh = pContextItems.Item("IManExt.Refresh")
If pRefresh = False Then
'MsgBox "Worksite Viewer is ready"
End If
pContextItems.Remove "IManExt.Refresh"
End If
GoTo Cleanup
ErrCatch:
Dim ErrorMsg As String
ErrorMsg = "Number : " & Err.Number & vbCrLf
ErrorMsg = ErrorMsg & "Description : " & Err.Description & vbCrLf
ErrorMsg = ErrorMsg & "Source : " & Err.Source & vbCrLf
MsgBox ErrorMsg, vbOKOnly, "MenuOption - ViewDocument"
Cleanup:
Set pContextItems = Nothing
Set pViewCmd = Nothing
Set pNrtDoc = Nothing
End Sub
Find more posts tagged with
Comments
TheSaint
DON"T WORRY...
ALL SORTED OUT .. I THINK...I HOPE....
Well we didn't restart the test box after upgrading the Worksite versions...
Silly I know... live and learn....