Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 597
  • Last Modified:

variant does not contain as object

Any idea why I'm getting this error??  Here is the lotus script:
Sub Click(Source As Navigator)
     
     Dim workspace As New NotesUIWorkspace
     Dim uidoc As NotesUIDocument
     Dim rc  As Integer
     Dim Tranlink As Variant
     
     Set uidoc = workspace.CurrentDocument
     Const T = ("GIST0008 - Xcom file transfers")
     Const R = ("GIST0010 - WMS file transfers")
     
     Tranlink = notesUIWorkspace.Prompt( PROMPT_OKCANCELLIST,"Transmission Media Schedules", "Please Select a Media type from the list below or cancel ", [""], [TRANSMIT, RECEIVE] )
     
     If Tranlink = "TRANSMIT" Then
          rc = Shell ("cmd /C  ""\\20.20.128.39\CSC\SDG DOC Repository\Data Center Mainframe Standards & Procedures\" & T & ".xls"" ")
     Else
          rc = Shell ("cmd /C  ""\\20.20.128.39\CSC\SDG DOC Repository\Data Center Mainframe Standards & Procedures\" & R & ".xls"" ")
     End If
     
End Sub
0
pratigan
Asked:
pratigan
  • 12
  • 4
  • 3
1 Solution
 
ArunkumarCommented:
Change this to...

Tranlink = notesUIWorkspace.Prompt

tranlink = workspace.prompt...

:-)
Arun.
0
 
ArunkumarCommented:
oops..change the notesUIWorkspace to workspace is what i meant...

:-)
0
 
pratiganAuthor Commented:
ok... now:
Named product object does not exist.....
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
HemanthaKumarCommented:
Change the way you prompt

        Dim tempList(1) As String
     tempList(0) = "TRANSMIT"
     tempList(1) = "RECEIVE"
     Tranlink  = WS.Prompt( PROMPT_OKCANCELLIST,"Transmission Media Schedules", "Please Select a Media type from the list below or cancel ", "", tempList )

~Hemanth
0
 
pratiganAuthor Commented:
Hello Arun,
I have also commented out the document statements as this is within a navigator button.  Here is the latest with the updates:  Getting the Named product object does not exist..... message ???!?!?!?!?!

Sub Click(Source As Navigator)
     
     Dim workspace As New NotesUIWorkspace
     'Dim uidoc As NotesUIDocument
     Dim rc  As Integer
     Dim Tranlink As Variant
     
     'Set uidoc = workspace.CurrentDocument
     Const T$ = "GIST0008 - Xcom file transfers"
     Const R$ = "GIST0010 - WMS file transfers"
     
     
     Tranlink = workspace.Prompt( PROMPT_OKCANCELLIST,"Transmission Media Schedules", "Please Select a Media type from the list below or cancel ", [""], [TRANSMIT, RECEIVE] )
     
     If Tranlink = "TRANSMIT" Then
          rc = Shell ("cmd /C  ""\\20.20.128.39\CSC\SDG DOC Repository\Data Center Mainframe Standards & Procedures\" & T & ".xls"" ")
     Else
          rc = Shell ("cmd /C  ""\\20.20.128.39\CSC\SDG DOC Repository\Data Center Mainframe Standards & Procedures\" & R & ".xls"" ")
     End If
     
End Sub

0
 
pratiganAuthor Commented:
Hello Hemanth,
That did it... Thank You !!!
I didn't get the document up, but the prompt worked... I tend to believe that the path name is not exactly correct.   Thak You .  I will award the points as soon as I have complteed the minor adjustments.
Thanks !
Paul
0
 
ArunkumarCommented:
Switch on the debug mode and let us know where the error throws up !

We will go from there !

-Arun.
0
 
pratiganAuthor Commented:
As I know execute this script and debug the script.. I find rc becoming a value of 33 and I do not get the dcument linked too.... Why is rc coming back with 33 ??
0
 
pratiganAuthor Commented:
I have checked another link process that also gives rc 33 and that link works... so therefore the problem is not with rc..... I have verified the link and the path is correct.... still searching..
0
 
pratiganAuthor Commented:
I have taken a link that I know works and substituted it for the linking I looking for and it works... therefore the path name I have in my new link is the problem....
Thank You !!

0
 
pratiganAuthor Commented:
If the file that I am linking to is secured as read only.... would this prohibit me from accessing it through the navigator.  I can open the document manually by stepping through the server paths to get to it. ?????
0
 
HemanthaKumarCommented:
33 means the shell task is completed successfully.
Read mode should not prevent you from opening the file. Here is a quick check that you can do by using following formula in button,

@Command( [Execute] ; application ; fileNames )

0
 
pratiganAuthor Commented:
Hello Hemanth,
I am executing the script within a navigator.. therefore the @Command functions are not recognized.
I am still attempting to debug the pathname.
Thank you !
Paul
|:)
0
 
pratiganAuthor Commented:
Hello Hemanth,
I believe I have determined the problem.  The & in the pathname is not being recognized properly and is therefore causing the path to be invalid.  I am going to attmpt to establish that particular folder containing the & as another constant and then place the constant within the path shell. ?!?!?  That is still not working ... I get nothing.. Any ideas ???
0
 
HemanthaKumarCommented:
You have to remove that &, somehow shell is failing when any special char is found.
0
 
pratiganAuthor Commented:
Hello Hemanth,
I am attempting to remove the & from the shell path, however that & is part of the path name and therefore I need to come up with an alternative that can fit this.  It was my understanding that anything within quotes and established as a char string was not evaluated but determined as a string within quotes.  When I use the msgbox to display the shell pathm the pathname appears corretly.  I established a CONST value containing the folder with & within quotes and still not getting any success ????
0
 
pratiganAuthor Commented:
Hello Hemanth,
I have resolved the problem by creating a DOS batch file on a different path that does not contain the & and then had the batch file retreive the necessary files.  A crazy way around it but it works.  Thank You for your help !
Paul
0
 
pratiganAuthor Commented:
Hemanth's expertise makes working with him enjoyable.  Thank You for all you help !!  
Always a pleasure...
Paul
0
 
HemanthaKumarCommented:
Anytime.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 12
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now