Word.Paragraph

H

hawki

How can I get oPara1.Range.Text = "CHIEF COMPLAINT:"
to support more than one line. I want to replace "CHIEF
COMPLAINT:" with the example below

Example would be:

the Emergency Department, except for a low oxygen
saturation of 83%. The patient was apparently confused.
They said that she had inappropriate words. The family
apparently told the Squad that the patient had awakened
that day with similar symptoms. They are more concerned
because they feel the patient has just not been eating and
drinking well over the past couple of days. They do not
feel that the confusion is a significant problem. They do
not feel that this has been a significant change other
than she was slightly slower to respond on awakening that
morning. She is followed on an outpatient basis by Dr.
McArthur at Third Street Clinic. Repeat pulse oximetry on
presentation here was 96% on room air. There is a history
of hyperlipidemia, diabetes mellit.

My Code


Private Sub Command1_Click()
Dim oWord As Word.Application
Dim oDoc As Word.Document
Dim oTable As Word.Table
Dim oPara1 As Word.Paragraph, oPara2 As Word.Paragraph
Dim oPara3 As Word.Paragraph, oPara4 As Word.Paragraph
Dim oPara5 As Word.Paragraph, oPara6 As Word.Paragraph
Dim oRng As Word.Range
Dim oShape As Word.InlineShape
Dim oChart As Object
Dim Pos As Double

'Start Word and open the document template.
Set oWord = CreateObject("Word.Application")
oWord.Visible = True
Set oDoc = oWord.Documents.Add

'Insert a paragraph at the beginning of the document.
Set oPara1 = oDoc.Content.Paragraphs.Add
oPara1.Range.Text = "CHIEF COMPLAINT:"
oPara1.Range.Font.Bold = True
oPara1.Format.SpaceAfter = 24 '24 pt spacing after
paragraph.
oPara1.Range.InsertParagraphAfter
 
P

Pat Garard

A.
For 'this' particular template, insert your replacement(s) as Auto-Text(s).
Your code should then call in the appropriate text.
When you first create the Auto-Text(s), they will go into the Normal
Template - use the Organiser to get them into 'this' Template.

OR

B.
Assemble your text string(s):

strMyReplacementText = "the Emergency Department, " & _
"except for a low oxygen" & vbCr & _
"saturation of 83%. The patient was apparently confused." & vbCr & _
"They said that she had inappropriate words. The family" & vbCr & _
"apparently told the Squad that the patient had awakened" & vbCr & _
"that day with similar symptoms." & vbCr

--
Hope this helps!

Pat Garard
Australia
apgarardATbigpondDOTnetDOTau

"One look is worth a thousand rumours."
Wen Hou, Warring States Period.

"Look twice!"
Pat Garard, 2003.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top