troubleshooting Question


Avatar of mcjann
mcjann asked on
Lotus IBM
4 Comments1 Solution547 ViewsLast Modified:
I have inherited a shared action that works very well on  a single document selected in a view. However I am struggling to make this work as an action that can be performed against each document in a view.

There is a type mismatch, that I don't understand, when attempting to set doc to uidoc of vice versa.

Any suggestions?

Sub Click(Source As Button)
      Dim session As New NotesSession  
      Dim db As NotesDatabase
      Dim dc As NotesDocumentCollection
      Dim workspace As New NotesUIWorkspace
      Dim uidoc As NotesUIDocument
      Dim doc As NotesDocument  
      Set x1App=CreateObject("Word.application")
      x1App.Visible = False
      Call workspace.EditDocument( False )
      Set uidoc = workspace.CurrentDocument
      Call uidoc.ExpandAllSections
      Call uidoc.Copy
            'get all document info
      Num  = uidoc.Fieldgettext("DocNum")
      Rev  = uidoc.Fieldgettext("Revision")
      FName=Replace(Num,"/","-") +" Rev "+ Cstr(Rev)
'save the document into MS Word format
      x1App.Documents.Add ("H:\DATA\_2012 Lotus Notes\Doc Ctrl\My Extracted Atts and Analysis\Content\_Content Template (with New Doc Routines).dot")
      ' the template specified has additional code to run on each new document (i.e. pasting content and clean up)
      x1App.ActiveDocument.SaveAs ("H:\DATA\_2012 Lotus Notes\Doc Ctrl\My Extracted Atts and Analysis\Content\"+FName + ".doc"      )
      Call uidoc.Close
      Set x1App=Nothing
End Sub
Sjef Bosman
Groupware Consultant

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros