How to Insert Rich Format Text into a Word document ?

Any suggestion is appreciate .thanks in advance. 


0
8/15/2008 1:15:24 AM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
526 Views

Similar Articles

[PageSpeed] 43

"Sunny" <sound_of_nature@hotmail.com> wrote in message 
news:uCmDjRn$IHA.3648@TK2MSFTNGP02.phx.gbl...
> Any suggestion is appreciate .thanks in advance.
>

Is the document open in Word, or are you trying to modify a Word file?

For the first case, you can use the Word object model (a COM interface) to 
insert text and to control formatting.  There's not much documentation on 
doing this from C++, so first you have to learn how to do it in the VBA that 
is part of Word.  Then you can translate that into COM calls from a C++ 
program.

-- 
Scott McPhillips [VC++ MVP] 

0
Scott
8/15/2008 1:59:34 AM
I am trying to modify a Word file. 


0
8/15/2008 9:16:40 AM
"Sunny" <sound_of_nature@hotmail.com> wrote in message 
news:e2%2300er$IHA.4684@TK2MSFTNGP06.phx.gbl...
>I am trying to modify a Word file.

The Word .doc format is hopelessly complex.  Don't try to programatically 
edit the .doc file on disk.  Your best bet is to use the Word automation 
model to ask the Word app to do it for you.  See 
http://www.joelonsoftware.com/oldnews/pages/February2008.html

-- David


0
dc2983 (3206)
8/23/2008 7:16:45 PM
Reply:

Similar Artilces:

There is no change to Print (from web format) in my file menu.
I am attempting to change a file from web format to print document format. Your help response is to click on "change to print" in the file menu. This option is not in my file menu. Can you help? ...

format cell to show zero if not a positive number
How can I format a column of figures to show that if the result is zero or negative amount it will just show a zero or be left blank. I am attempting to show the difference between figures that have been invoiced to figures that have been added and thus need to be invoiced. Use a custom format like #,##0.00_);; or #,##0.00_);"0";"0" HTH, Bernie MS Excel MVP "TechnoGram" <mumzee3@hotmail.com> wrote in message news:4183a06c-5eb1-4699-9efd-fd8a4bdd4e07@d62g2000hsf.googlegroups.com... > How can I format a column of figures to show that if the result i...

change a word file back to a pdf file
i changed a pdf file in to a word file how can i change it back to a pdf file in microsoft outlook. Also i could not read the file in word Please Help You post Word, PDF question in Outlook group? "Ann" <Ann@discussions.microsoft.com> wrote in message news:0A6AFC3C-2780-4182-BAFC-C07D3D9A7FF3@microsoft.com... >i changed a pdf file in to a word file how can i change it back to a pdf >file > in microsoft outlook. > > Also i could not read the file in word > Please Help Did you change it by simply renaming the file extension? -- Kathleen Orland - MVP...

OL 2002 SP3: Documentation bug about client-only rules
There is incomplete information under the "My rule name contains Client Only" section of "Troubleshooting Outlook Rules" page (located at mk:@MSITStore:C:\Program%20Files\Microsoft%20Office\Office10\1033) It fails to mention that adding a rule to look for specific words in recipient's address also will also cause the rule to become client only. ...

conditional formatting
I am trying to evaluate publisher to see what limitations there are for printing a smal booklet? How can I turn images on and off or assign an image depending on a data field on a merge without coding VB? Is it possible or do I have resort to writting code? I would like to dynamically change images on a template and also turn on and off. What is the best way possible to do this? Thanks, AL AL_LONGO <ALLONGO@discussions.microsoft.com> was very recently heard to utter: > How can I turn images on and off or assign an image depending on a > data field on a merge without coding...

Translate any english number into English word
I am a beginner. it may be a silly question. In excel, suppose in one cell a number is appearing as 9. I want to write in another cell as "Nine". How it will be possible? SANTANU Hi, See here http://support.microsoft.com/default.aspx?scid=kb;en-us;213360 'How to convert a numeric value into English words in Excel' "SANTANU" wrote: > I am a beginner. it may be a silly question. > > In excel, suppose in one cell a number is appearing as 9. I want to write in > another cell as "Nine". > > How i...

How do I insert Roman Numerals?
New to Word 2007 would someone please explain to me how to insert Roman Numerlas in my document? "ckj" <ckj@discussions.microsoft.com> wrote in message news:6CF0C580-BA6E-463D-B4FD-E6A6FDD9E814@microsoft.com... > New to Word 2007 would someone please explain to me how to insert Roman > Numerlas in my document? Just type them... I II III IV V VI VII VIII IX X XI etc etc. Type a number e.g. 21, select it and run the following macro Dim oRng As Range Set oRng = Selection.Range oRng.Fields.Add oRng, 34, oRng.Text & " \*Roman"...

Numerical Formatting in a Report
Hello, I am trying to whittle down some duplicate files on our server. One of the lines in the report provides a summary of a particular duplicated file. In the text box control, I have the following: ="There are " & [subCounter] & " additional copies of '" & [File_Name] & "' potentially using up to " & [footsum] & " MB of space." which works, but is ugly. The [footsum] entity is calculated by dividing the file size in bytes by 1024 and again by 1024 to yield MB. Is there a way to round the [footsum] calculation to ...

How do I format publication design after page 18?
After I hit page 18 I could no longer format the publication design onto the page. Thought it might be considered the back cover but I even tried inserting pages and it still happened. Any suggestions? What formatting are you using? Text? When you setup your project did you use a wizard? What version of Publisher are you using? Have you tried, insert page, duplicate all objects on page XX? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "gw" <gw@discussions.microsoft.com> wrote in message news:91BA1FA9-6AA2-44C7-81D...

Exporting Documents
How do you export an excel document into word without changing the way it was setup? Go into word and open up your excel document from word. If you don't have the converter installed you may have to install it. Try opening the excel workbook first, if you don't have the converter installed it will tell you. Hope this helps. >-----Original Message----- >How do you export an excel document into word without >changing the way it was setup? >. > ...

Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance. You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -...

Auto correct text changes
I am editing a document in word 2007 that has been saved in compatible mode. Whe I try to turn one heading into italics or bold it changes all the headings in the document to the same formatiing. Can any one help me to stop this happening. If I then press undo all the other changes revert back and not the one I have just made. I can't keep pressing undo everytime I make a change. I just want it to change the words I am highlighting See http://word.mvps.org/faqs/formatting/wholedocumentreformatted.htm. -- Stefan Blom Microsoft Word MVP "David Rudman"...

inserting hrs and minutes
I have a cell in my time card that displays total weekly time -ex- "40:15" is there a way to make it more like this...40hrs,15mins -- Message posted from http://www.ExcelForum.com Use a custom format hh"hrs",mm"mins" -- Regards, Peo Sjoblom "-Brian-H- >" <<Brian-H-.110wgs@excelforum-nospam.com> wrote in message news:Brian-H-.110wgs@excelforum-nospam.com... > I have a cell in my time card that displays total weekly time -ex- > "40:15" is there a way to make it more like this...40hrs,15mins ? > > > ...

colour formatting
hi all.. Has anyone any idea how to chnge the colour of the text in say a1, a2, a3 simply from the results of what word is placed in cell a4 TIA Use the Format-->Conditional formatting command. 1. Select cells A1:A3 2. Click Format-->Conditional formatting 3. Change the first dropdown (on the left) to "Formula Is" 4. Enter the following formula in the textbox to the right of "Formula Is": =$A$4="Hello" Where: $A$4 = the cell you're testing "Hello" = the word/phrase that will make the font color change. Make sure ...

Automatic conditional formatting from a list
Hi All I need a macro that colours cells if the product name in column A on it's row matches any in the product list. There is a list of product names in C17:End(xlUp).Row, that have different backgrounds applied to each cell in the list. The macro looks at Column A in the worksheet & compares it to the product name list. Where it finds a product name match, it goes across to columns I:BJ (on the matched row) and applies the product name's background colour to any "active cells" (i.e. value >0). The following code does this but it's applies...

How do i get Harvard style referencing in word 2007?
Hi, I am currently writing my Dissertation for my University Degree. I have found the citation feature extreamly usefull as it automaticaly adds the referencing to my work. However, after speaking to my project supervisor, she has informed me that the citation style will not be acceptable as it is not "Harvard" style. I was wondering if there is an update that i can download to enable to have harvard style referencing in my work. I would apreciate any help that you can give. Thank you I suggest you speak again with your supervisor as there is no such thing as ...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

insert an interactive excel file into word web page
I'm trying to insert a excel file into a word document with text, and then save it was as a web page, but I want to keep the excel part interactive. Any ideas? ...

Inserting Hyperlinks in a Protected Sheet
Hi I run Excel 2000 and I have a protected worksheet that I share wit users in my organisation. I want to allow the insertion of a hyperlin to a specific file type within a specified directory on our server. 3 Questions: 1.Protection on disables the insert hyperlink command. Can this b overcome with worksheet activate code? 2.Can I limit the types of files (preferably by requiring the file t meet a mask format eg "z-*.xls")? 3.Can I limit the directory that can be linked, by referring to pathname stored in a cell on the active sheet? Would appreciate your suggestions. Thanks S...

Formatting Text in Network Diagram View
The text in the boxes of my Network Diagram view is cut off. I can't find a way to make the boxes larger or the font smaller. Does anybody know how to display a task's full text in a Network Diagram box? Thanks! Hi, Right Click, select Box Styles Click More Templates Select New Use Cell Layout to change cell width and Font to find a smaller one You cannot select 6 but when you type it it is accepted. HTH -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf ...

difficulty with conditional formatting
I have a spreadsheet that gets updated monthly and looks like the example below Jan Feb march April May June 21,000 23,500 22,224 22111 20,111 25,000 I've asked this question before and have gotten great tips but each month when refesh the pivot table it looses all the conditional formatting and I start over again. How do I get the pivot table to keep it's formatting when refresehd? The conditional formatting needed is if #'s go down for three consecutive months in a row they are highlighted in red. I need the first...

Get/Replace words in HTML control
Hi all, I have an application that has an HTML control (like the CHtmlEditCtrlBase in VC7, but in VC6) to compose email messages. I want now to add spell checking to it. I have the spell checking engine, I have only to provide the words to it, and I'll get the list with suggestions. My question is how can I retrieve the text from that control without all the HTML tags. The second question is, when I have the replacement for a misspelled word, how can I replace the misspelled word in the HTML control with the correct one? I hope somebody has an easy way to do this :) Thanks, Mihaly ...

how do I format text as strikethrough in Publisher 2003?
I am copying over text from a WordPerfect document into Microsoft Publisher 2003. Text that has been formatted as "Strikethrough" in the WordPerfect document comes over as plain text with no strikethrough. I have even tried to just import the document which it looks like it does fairly well at, except that all text formatted as strikethrough is imported as plain text. I can possibly believe that Publisher does not have any way to format text in this way, but I have looked everywhere and cannot figure out how to format the text in this way. Can anyone help? You will have to ...

Insert with a where condition
Hi, sql 2005 I have an insert statement that is ignoring the where condition. That is, I want to insert records when they do not already exist in the destination table. INSERT INTO dbo.tblmnuGroupPerm ( gId ,mtfID ,... ) SELECT @gID ,mtfID ,... FROM dbo.locmnuTabFunction AS ltf WHERE ltf.mtfID NOT IN ( SELECT gp.mtfID FROM dbo.tblmnuGroupPerm AS gp WHERE gp.gId=@gID AND gp.Deleted=0 ) Any ideas or recommendations appreciated :-) Many thanks, Jonathan It's OK... <oops "redFace">I did not correctly se...

My Word Document is formated wrong on a PC
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I went for a job interview the other day and when I looked at the Resume they had printed out the formatting was off. The spacing between the sentences were ok but the type that should of been on the second was half way down the second page. I took my original PC word doc. and opened it up and the Mac and it's the same way only it backwards most the type that should of been on the second page most of it was on the first page. I even made the PC word doc a .rtf file but it's still wrong and I can't se...