Solved

variant does not contain as object

Posted on 2002-04-18
19
585 Views
Last Modified: 2013-12-18
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
Comment
Question by:pratigan
  • 12
  • 4
  • 3
19 Comments
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
Change this to...

Tranlink = notesUIWorkspace.Prompt

tranlink = workspace.prompt...

:-)
Arun.
0
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
oops..change the notesUIWorkspace to workspace is what i meant...

:-)
0
 
LVL 4

Author Comment

by:pratigan
Comment Utility
ok... now:
Named product object does not exist.....
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 9

Expert Comment

by:Arunkumar
Comment Utility
Switch on the debug mode and let us know where the error throws up !

We will go from there !

-Arun.
0
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
You have to remove that &, somehow shell is failing when any special char is found.
0
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
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
 
LVL 4

Author Comment

by:pratigan
Comment Utility
Hemanth's expertise makes working with him enjoyable.  Thank You for all you help !!  
Always a pleasure...
Paul
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Anytime.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now