[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Create a copy of generated file

Posted on 2004-04-18
11
Medium Priority
?
188 Views
Last Modified: 2013-12-18
i generated a csv file and attached it to a document at run time, my problem now is, how can i make copy of the same file in a folder in my hard disk drive, also at run time? so the process would be, i generate the file, attach the file to a document then save it in one of my hdd folders....hoping for a prompt reply! tnx!!
0
Comment
Question by:macjacinto
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10857235
Depends on how you egenrated the file. I'd suggest add the code to save it at the same place where you have generated it. Also, post your code that you are using to generate the file.

You can also use @Command( [EditDetach] ; sourcefile ; targetfile ) if thjat is the only atytachment in your document.
0
 

Author Comment

by:macjacinto
ID: 10857491
here's the code i used in attaching the file to the document

      'Create report document
      Set docReport = New notesDocument(db)
      docReport.Form = "amla"
      docReport. FormName = "amla"
      docReport.AgentStatus = "0"
      docReport.Flag = "No"
      docReport.SendTo = "amla"
      docReport.dcol = Format(doc.transtag (0), "mm/dd/yyyy")
      docReport.brname = doc2.profile(0)
      docReport.by =by$
      Set rtitem = New NotesRichTextItem(docReport, "txt")
      Set object = rtitem.EmbedObject ( EMBED_ATTACHMENT, "", strFileName)      
      Call docReport.ComputeWithForm(False,False)
      Call docReport.Save(True,False)      
      Call w.viewRefresh
      Close fileNum%
      Kill strFileName
      Messagebox("Done Generating CSV File")
      Exit Sub
      End If

if i use the @command u gave, what sourcefile will i indicate? since i generated the file at runtime?
0
 
LVL 19

Accepted Solution

by:
RanjeetRain earned 1500 total points
ID: 10857626
You have everything you need!

    Set docReport = New notesDocument(db)
    docReport.Form = "amla"
    docReport. FormName = "amla"
    docReport.AgentStatus = "0"
    docReport.Flag = "No"
    docReport.SendTo = "amla"
    docReport.dcol = Format(doc.transtag (0), "mm/dd/yyyy")
    docReport.brname = doc2.profile(0)
    docReport.by =by$
    Set rtitem = New NotesRichTextItem(docReport, "txt")
    Set object = rtitem.EmbedObject ( EMBED_ATTACHMENT, "", strFileName)    
    Call docReport.ComputeWithForm(False,False)
    Call docReport.Save(True,False)    
    Call w.viewRefresh
    Close fileNum%

    '''''''''''''''''''''''''''' Code added by Ranjeet Rain
    Dim strPath as string
    strPath = "C:\\Temp\\"
    FileCopy strFileName, strPath & strFileName
    '''''''''''''''''''''''''''' End code added by Ranjeet Rain

    Kill strFileName
    Messagebox("Done Generating CSV File")
    Exit Sub
    End If



Change the value of strPath as per your needs.
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 19

Expert Comment

by:RanjeetRain
ID: 10868181
macjacinto,

Have you tested the code?
0
 

Author Comment

by:macjacinto
ID: 10885255
the error "File Not Found" appeared :(
0
 

Author Comment

by:macjacinto
ID: 10885302
ranjeet...i found the prob :) i didnt used the code you gave but just deleted the Kill strFileName line and it worked out perfectly
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10885582
I just checked your profile. And Your question history too. Here is what I saw.

Questions Asked: 34
Questions Open: 4         <---
Questions Graded: 13
Questions Deleted: 17    <---
Last 10 Grades Given: A A A B A A A A A A

I also checked some of your threads. I now understand why no one responded to such a simple question even after hours of it was posted in a TA where people recv answers within minutes.

My answer was to-the-point and it solved your problem in a pretty neat way. You must close this question with an A, unlike you have done in many of your previous threads.
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10885584
By the way, your deleting the KILL statement doesn't serve a purpose in the scenario. You can't use that as a pretext to keep this thread open or ask for a refund.
0
 

Author Comment

by:macjacinto
ID: 10897488
I dont think i need to explain to you why i havent closed my open questions yet, as for the deleted questions, you may want to check each of them to see if i got any solutions for the problem i posted. Dont you yourself deleted questions and you also have open questions as of date?! And we have different reasons of doing so, so dont go accussing me of anything. I merely informed you of what I did and that was your reaction?! Gee
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10897653
I am sorry, I reckon I was a little too harsh. I apologize!
0
 
LVL 19

Expert Comment

by:RanjeetRain
ID: 10897663
Also, I want to thank you specially, since your accepting this question has taken me past my 100K here :D

Thanks again!
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

649 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