OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Remove the newline char whiel writing to text file

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Fri May 11, 2012 8:02 am    Post subject: Remove the newline char whiel writing to text file Reply with quote

Hi,

This simple macro will write the text "ABC" to the file temp.txt under E: drive. However if we open the text file, notice that there is a new line char after C. How can we get rid of this, so that it will end after C

Code:

Sub ExamplePrint
Print "ABC"
Print "ABC","123"
i = FreeFile()
Open "e:\Temp.txt" For Output As i
Print #i, "ABC"
Close #i
end Sub
Back to top
View user's profile Send private message
jaango123
General User
General User


Joined: 12 Apr 2012
Posts: 12

PostPosted: Fri May 11, 2012 8:27 am    Post subject: Re: Remove the newline char whiel writing to text file Reply with quote

In vba if we give like this, the newline doesnt come. however in openoffice the whole text document comes as empty

Code:

Print #i, "ABC";
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group