?
Solved

CHANGE FILE NAME OF NEW OPEN OOCALC

Posted on 2011-04-20
4
Medium Priority
?
398 Views
Last Modified: 2012-05-11
Hi All,

I print report to OOCalc.

I change its file name using :

 oCalcDoc.getCurrentController().getFrame().Title = "TRIAL BALANCE " 

But when I click file, save as from menu OOCalc, its filename still "Untitled 1"

I want the file name kept "TRIAL BALANCE " when we save it.

How could I do it ?

Thank you.
0
Comment
Question by:emi_sastra
  • 2
4 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 35432332
Is there any oCalcDoc.Name property?
0
 
LVL 1

Author Comment

by:emi_sastra
ID: 35432457
No.

Thank you.
0
 
LVL 20

Accepted Solution

by:
ltlbearand3 earned 2000 total points
ID: 35445130
The document does not actually get a name until it is saved the first time.  You can use the .storetoURL event to save the document for the first time and that will give it the name.


Dim objServiceManager As Object = CreateObject("com.sun.star.ServiceManager")
        Dim objOODesktop As Object = objServiceManager.createInstance("com.sun.star.frame.Desktop")
        Dim arg(-1) As Object
        Dim objCalc As Object = objOODesktop.LoadComponentFromUrl("private:factory/scalc", "_blank", 0, arg)
		
		objCalc.storetoURL("file:///E:/EETest/vbtest.ods", arg)

Open in new window

0
 
LVL 1

Author Comment

by:emi_sastra
ID: 35451615
Hi ltlbearand3,

Thank you very much for your help.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month14 days, 5 hours left to enroll

807 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