Solved

variant does not contain as object

Posted on 2002-04-18
19
586 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
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
names.nsf ODS upgrade 4 424
Lotus Notes 8.5 1 140
All incoming messages are coming as read 3 34
Lotus Domino Server 9 4 82
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

920 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

16 Experts available now in Live!

Get 1:1 Help Now