How to make a Carriage Return in a Word-Table by OLE Automation
I generated a Table in a Word-Document by using the OLE2 Interface.
After that I wrote a Text in the first cell of the table.
Now I want to make a Carriage Return to write another Textline in the same Cell.
But first i must move the cursor to the end of the Text.
I haven't already figured that out.
Can someone Help me?
I tried this but then the Cursor moves to the Begin of the second Cell in the same row.
*Writing the Text in the Cell
GET PROPERTY OF o_cell 'Range' = o_range.
SET PROPERTY OF o_range 'Text' = wa_anschr-ename.
*Move Cursor
GET PROPERTY OF o_cell 'Range' = o_range.
GET PROPERTY OF o_range 'End' = ld_pos.
SET PROPERTY OF o_range 'Start' = ld_pos.
CALL METHOD OF o_range ' Select'.
I don't know about your suggestion.
I solved the Problem with that Method:
CALL METHOD OF o_selection 'EndKey'
EXPORTING
#1 = '5'.
CALL METHOD OF o_selection 'TypeParagraph'.
The Parameter "5" ist the VB Constant wdline...
Now it works and I'm happy
Similar Messages
-
How to make a function return number(10,0) data type (ORACLE 10g)?
With 10g, how to make a function return number(10,0) data type?
here is the function, it returns a number type :
create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
BEGIN
If p_HistObjTable ='amPortfolio'
then v_Id:=p_LHISTOBJID ;
elsIf p_HistObjTable = 'amComputer' then
select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
else v_Id:=-99;
End If;
RETURN v_Id;
END Get_portfolio_Id3;
Thanks.
Message was edited by:
user631701create or replace FUNCTION Get_portfolio_Id3 (p_HistObjTable In Varchar2,p_LHISTOBJID IN NUMBER) RETURN view_cpu_STD_Asset.LPORTFOLIOITEMID%Type IS
v_Id view_cpu_STD_Asset.LPORTFOLIOITEMID%Type;
BEGIN
If p_HistObjTable ='amPortfolio'
then v_Id:=p_LHISTOBJID ;
elsIf p_HistObjTable = 'amComputer' then
select litemid into v_Id from smcdba.amComputer c where c.LCOMPUTERID=p_LHISTOBJID ;
else v_Id:=-99;
End If;
RETURN round(v_Id);
END Get_portfolio_Id3; -
Hi
How to add a carriage return after Survey Type, so that the Channel Time will start from column one.
Thanks,
Steve
Solved!
Go to Solution.
Attachments:
Write.vi 39 KBtry something like the following draft. (not tested, so modify as needed).
LabVIEW Champion . Do more with less code and in less time .
Attachments:
Write-MOD.vi 32 KB -
Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.The Oracle documentation has a good overview of the options available
Generating XML Data from the Database
Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
You can also find some information in XML DB FAQ -
How to make the diagonal line in the swing table cell?
Hi all,
How to make the diagonal line in the swing table cell just like the link below?
http://61.132.17.188/webber/table.gifOne improvement.. To get a line that is neat, use a bit of Graphics2D
public void paintComponent(java.awt.Graphics g)
int w = getSize().width;
int h = getSize().height;
// draw a line between (0,0) and (w,h)
g.setColor(getForeground());
if (strTop == null)
strTop = " ";
if (strBottom == null)
strBottom = " ";
java.awt.Graphics2D g2 = (java.awt.Graphics2D)g;
g2.setRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING,java.awt.RenderingHints.VALUE_ANTIALIAS_ON);
//g2.setStroke(new java.awt.BasicStroke(14.0f));
g.drawLine(0, 0, w, h);
//the following lines will draw the two strings,
//one above the top of the line and the above below it.
g2.drawString(strTop, (w/2)+2, (h/2)-2);
g2.drawString(strBottom, 2, (h / 2) + 2);
//the x,y for drawString are only based on assumption. //do necessary changes to suit ur needs.
}Then create a TableCellRenderer and set it to the Table Header for ur table's 1st row.....
Cheers -
Can any one tell me how to make a join in between RESB & VBAP Table
Hi.
can any one tell me how to make a join in between RESB & VBAP Table. Please do the needful.u have Sales order number and sales order item number in RESB table..
KDAUF Sales Order Number
KDPOS Item Number in Sales Order -
How to make default Currency depending upon plant in table entries
Hi,,
How to make default Currency depending upon plant in table entries?
I am making entries in SM30.
I have the following fields in z table.
plaant , material,month.year,PFvalue,Currency.
Can some body throw light for this issue,please?\
I am familiar with modification-events.
With Regards,
JaheerHi,
In PBO, within a LOOP, table control is filled via a Structure/Work Area.
In that module, code as follows,
LOOP AT SCREEN.
IF WA-FIELD1 = C_1 AND SCREEN-GROUP1 = C_G1.
SCREEN-INPUT = 0.
MODIFY SCREEN.
ENDIF.
ENDLOOP.
Here, WA is a strcture & FIELD1 is its field, like that...
I already did this.
Check it out & Reply.
Yours,
R.Nagarajan
We can -
How to find a carriage return and Line feed?
I need to detect if a crriage retunr and line feed present on each row in my text file before allowing user to upload the text file
I know how to remove them from each line but what I need is to detect them no removing them from file.
Our concern is when the a row does not have carriage return and line feed.
Is there a way to find this using CF? Please help
thanksThat is exactly the problem Dave, if some rows do not have line feed, they're not being inserted into DB, it skips other steps and go right to finish. It looks
like the file is done processing.
So I need to do early rejection to this kind of file.
I used cfloop to catch anything else that do not follow the formatting rules.
Here is what I already done:
Right after the file got uploaded, I have these codes:
<cfloop index="x" file="#MyFile#" >
<CFSETMyLine = Replace(x,chr(9),"|", "ALL")>
I'm using a few functions, such as, Left(), Mid(), Right(), etc to make sure certain rules are followed.
Up till here, it's done and tested, everything is working.
The only problem is when 1 or more rows don't end up with line feed and or carriage return.
I plan to add some codes to check the end of each row for chr(10) since it is looping for every row anyway.
If detected, process file normally otherwise stop processing.
</cfloop>
So this can't be done in CF? -
Interactive Report: how can I display carriage returns?
Hello everybody.
Here is my problem: I created a table containing a field COMMENT varchar2(4000) and using APEX 4.1 I built an interactive report on it.
Users can fill the field COMMENT with sentences on different rows, ex:
" this is the first line
this is the second line
this is the third line"
This is correctly managed in the FORM, where I defined the field COMMENT as 'Text Area', but in the REPORT I wasn't able to set it in a way which permits to see it whit the carriage returns: the content is displayed on one row only : "this is the first linethis is the second linethis is the third line".
I tried and set all the possible field types, but I found no ways to display the content exactly as it is (with carriage returns).
Obviously I cannot use HTML
, since I cannot ask users to digit it when inserting their text.
Could someone suggest me how to reach this result? In need to use the interactive report because the searching/filtering tool is fundamental.
Thanks in advance,
Daniele>
Please update your forum profile with a real handle instead of "user9211286".
Here is my problem: I created a table containing a field COMMENT varchar2(4000) and using APEX 4.1 I built an interactive report on it.
Users can fill the field COMMENT with sentences on different rows, ex:
" this is the first line
this is the second line
this is the third line"
This is correctly managed in the FORM, where I defined the field COMMENT as 'Text Area', but in the REPORT I wasn't able to set it in a way which permits to see it whit the carriage returns: the content is displayed on one row only : "this is the first linethis is the second linethis is the third line".
I tried and set all the possible field types, but I found no ways to display the content exactly as it is (with carriage returns).
Obviously I cannot use HTML
, since I cannot ask users to digit it when inserting their text.
Could someone suggest me how to reach this result? In need to use the interactive report because the searching/filtering tool is fundamental.Use a CSS style sheet with attribute selectors. Put this in the page HTML Header, replacing the <tt>T_EMP_NAME</tt> etc selectors with the actual <tt>id</tt> attributes of your column headers:
<style type="text/css">
.apexir_WORKSHEET_DATA td[headers="T_EMP_NAME"] {
white-space: pre;
</style>
Interactive Report Control Break disregards HTML Header style. -
How do we remove Carriage Return (line feed) inserted in FCC files
Hi Experts,
The file that we generate has a carriage return at the end.
Is there any way in which we can remove this carriage return (line feed) from the file?
The FCC parameters used at our end are as below:
structure.filedNames:
structure.fieldFixedLengths:
structure.fixedLengthTooShortHandling: Cut
Kindly tell us a solution ASAP.
Thanks & Regards
DhwaniDear All,
Let me elaborate on my query
Consider that the files output looks like below:
12 34 45 545 5454 UL
23 33 43 434 4545 FG
45 44 44 586 6535 GM
Now there is an extra line(Carriage Return) getting inserted after the last line 45 44 44 586 6535 GM which is not required at our end.
The cursor of the file instead of stopping on the last character M, points to the next line.
Can you please suggest how to remove this extra line from the files.
I dont understan how will remove context help in this case.
Regards
Dhwani -
How to put a carriage return in a String
I am creating an error message on my class which is called and displayed on my JSP page.
In my string I want it to do a Carriage return. I used a \n however it just ignores it when displayed in JSP using scriplets.
Class declaration:
-- Want this line to start on the next line..
/** Used for the Error message for a text box. */
private final String TEXTBOX_ERROR_MSG = "\n NOTE: The text box characters left count may not be accurate.";
Used in getDBErrors() method:
--errors is an array of error records displayed in the JSP
if(this.notes != null && this.notes.length() > 4000)
errors.add("Notes Tab: Notes section cannot be greater than 4000 characters." + this.TEXTBOX_ERROR_MSG);
JSP Page code:
--Get the list of Errors from the class
List pbrDBErrors = editBean.getDBErrors();
-- Display errors:
for(int l=0; l<pbrDBErrors.size(); l++)
%>
<li>
----------- Display ERROR Message Here
<%= (String)pbrDBErrors.get(l) %>
</li>
<%
} %>++++++++++++++++++++++++++++++++++++++++++++++++++++++++
All the code works great - Its just the TEXTBOX_ERROR_MSG is displayed on the same line as the rest of the message and it scrolls off the page.
How do it get it to do a cariage return?? \n does not seem to work.
ThanksI learned something new today.. I guess I can go home :)
I am creating an error message on my class which is
called and displayed on my JSP page.
In my string I want it to do a Carriage return. I
used a \n however it just ignores it when displayed
in JSP using scriplets.
Class declaration:
-- Want this line to start on the next line..
/** Used for the Error message for a text box.
private final String TEXTBOX_ERROR_MSG = "\n NOTE:
The text box characters left count may not be
accurate.";
Used in getDBErrors() method:
--errors is an array of error records displayed in
the JSP
if(this.notes != null && this.notes.length() >
4000)
errors.add("Notes Tab: Notes section cannot be
ot be greater than 4000 characters." +
this.TEXTBOX_ERROR_MSG);
JSP Page code:
--Get the list of Errors from the class
List pbrDBErrors = editBean.getDBErrors();
-- Display errors:
for(int l=0; l<pbrDBErrors.size(); l++)
%>
<li>
----------- Display ERROR Message Here
<%= (String)pbrDBErrors.get(l) %>
</li>
<%
} %>++++++++++++++++++++++++++++++++++++++++++++++++++++++
++
All the code works great - Its just the
TEXTBOX_ERROR_MSG is displayed on the same line as
the rest of the message and it scrolls off the page.
How do it get it to do a cariage return?? \n does not
seem to work.
ThanksThanks the <br> worked great.... -
How does one replace carriage returns (enter key) in text areas
I have an address text area in one of my pages where end users are hitting enter after each part of the address. I want to replace the carriage return hex('0A') with spaces. How can I do that?
If you're manually saving your data, you can just change your insert/update code as below:
insert into myTable
(myCol)
values
(replace(:PXX_MY_TEXT_AREA, Chr(10), ' '))
where ...If you're building a page where you aren't directly saving your data, you can add an "on Submit/Before Computation" process that does something like:
:PXX_MY_TEXT_AREA := replace(:PXX_MY_TEXT_AREA, Chr(10), ' '); -
How to insert a carriage return in a varchar field
Post Author: gilles
CA Forum: Data Integration
Hello,
How do you insert a carriage return in a varchar field in BODI ? I couldn't find a function like CHAR(13)...
Thanks
GillesPost Author: gilles
CA Forum: Data Integration
Thanks a lot,
I'll upgrade to 11.7 (currently 11.5.1)
Gilles -
How to include a carriage return in a TestStand string variable
Is there anyway to add a carriage return to a TestStand string variable. I am sending commands to an instrument using the Rs232 serial bus and they need to be terminated with a carriage return ie "\r". I know you can creat a DLL and return the string variables to TestStand but is there a beter way ?
Hi Paul,
Sorry about that, just noticed I left off the "" in my last response.
Try "\\r". that should solve it.
Regards
Ray Farmer
Message Edited by Ray Farmer on 09-15-2005 09:14 AM
Regards
Ray Farmer -
Carriage return in a WD table cell
Hi,
I have data in a table cell which I would like to present better by adding a carriage returns so that it appears on more than one line for example as bullet points.
I can format it using HTML but cant seem to be able to find out how to set encode to true for that cell.
Has anyone come across this problem before, or even have a simpler solution.
Cheers
PhilHi Phil,
Check this Multiple Text lines in ONE row of a Table . On what SP level are you?
Best regards, Maksim Rashchynski.
Maybe you are looking for
-
Solution Centre in Win 8.1 keeps runs device detection on every use
New Win 8.1 notebook. Connected the OfficeJet Pro 8500A A910g by USB. Windows detected and loaded printer driver, also loaded network driver as printer connected via wireless. Disconnected USB cable. Downloaded and installed HP full software package
-
How to remove a Windows 7 partition that did not properly install in Lion?
So I was in the process of installing Windows 7 and partitioning the hard drive to give 20 GB to Windows 7 when I accidentally tripped my charger and shut down my computer. When I turned it back on I realized 20 gb of memory was missing and I could n
-
Campaign output to BP with multiple email addresses
Hi all, I noticed that within Campaign Execution the output to email channel will only send an output (mail form) to the business partners standard email address. Question is: how to send an output to ALL email addresses stored within a business part
-
Quick VPN step-by-step guide!
Hello. Can someone please provide a step-by-step guide on how to configure the SA-520 for Quick VPN Access? The manual doesn't describe this scenario at all, so please someone give me instructions how to set the IKE and VPN policy so that Quick VPN c
-
When I try to finalize my project a message pops up, "Sharing requires more memory to be available." How do I work this issue out?