Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

variant does not contain as object

Posted on 2002-04-18
19
Medium Priority
?
595 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
ID: 6951201
Change this to...

Tranlink = notesUIWorkspace.Prompt

tranlink = workspace.prompt...

:-)
Arun.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 6951202
oops..change the notesUIWorkspace to workspace is what i meant...

:-)
0
 
LVL 4

Author Comment

by:pratigan
ID: 6951345
ok... now:
Named product object does not exist.....
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 200 total points
ID: 6951505
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
ID: 6951562
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
ID: 6951577
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
ID: 6951583
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
ID: 6951657
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
ID: 6951666
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
 
LVL 4

Author Comment

by:pratigan
ID: 6951684
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
ID: 6951702
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
ID: 6951768
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
ID: 6953219
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
ID: 6953355
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
ID: 6954647
You have to remove that &, somehow shell is failing when any special char is found.
0
 
LVL 4

Author Comment

by:pratigan
ID: 6959512
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
ID: 6960316
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
ID: 6960327
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
ID: 6960704
Anytime.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

879 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