![]() |
|
#1
|
|||
|
|||
![]()
Hello
There is a document which has both texts and pictures (pictures are defined as 'tight' in 'Text Wrapping'). I want to assign a Style to texts and assign another Style to pictures separately. I have no problem with assigning Style (e.g. Style.1) to texts, but when I try to assign another Style (e.g. Style.2) to pictures, it assigns that Style (Style.2) to the TEXT which is around that picture (I want to JUST picture be assigned with Style.2). How can I solve this problem and I assign two different Styles to texts and pictures separately? Meanwhile Do not forget that the pictures are 'tight' not 'In Line With Text'. Mohsen |
#2
|
||||
|
||||
![]()
Floating pictures (those with text wrapping) are anchored to paragraphs which may or may not actually correspond with the position of the graphic.
If you want to apply a style to the graphic then you need to change the positioning of the graphic to "in line with text" and put them in their own paragraph. You could create an empty paragraph and move the graphic's anchor to that paragraph. This would allow you to apply a style to that paragraph but I don't see the point.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
|||
|
|||
![]()
Guessed
Thank you but if I make a blank paragraph and drag my picture on it and change it's format to 'In-Line with text', then the texts around the picture move up and down the picture and the picture remains alone. I want to have texts around the picture, but with another Style. Let me explain why I want to separate Styles of texts and pictures. Maybe you can solve the problem in another way: The texts have so many 'Cross-Referece's. Whenever I 'Update Fields' to update the page numbers which has changed, pictures are updated TOO. When a picture is updated, it returns and resets to original size. I do not want pictures to return to original sizes, then it is necessary to select JUST texts and update them. I assign an especial Style to texts, the I can select them easily to update them justly. Do you know a way to select JUST texts in a document to 'Update Fields'? Mohsen |
#4
|
||||
|
||||
![]()
Well you could lock the graphic fields so they won't update (until you unlock them again). To lock a field you select it and then press either Ctrl-3 or Ctrl-F11.
Alternatively, you could create and run a macro to update just the page number fields.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
|||
|
|||
![]()
Guessed
thanks. For 'lock'ing pictures, I must select them first. How can select all pictures in a document? Mohsen |
#6
|
||||
|
||||
![]()
I think you are going to need a macro to carry out the task quickly.
If you post a sample document I can show you what code would do the job. But then again, if you are going to use a macro, you might as well just use a macro to selectively update the relevant fields.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#7
|
|||
|
|||
![]()
Hello
A part of the document is attached here. My Word is 2007. Would you help me in macro. By the way, after selecting the whole texts (with your macro), I have no problem in updating it. |
#8
|
||||
|
||||
![]()
The graphics in that document are not 'fields' so a macro to update all the fields would be as follows.
I have included a debug line so you can review (in the VBA Immediate Window) all the fields that get updated by this macro. Code:
Sub UpdateFields() Dim aFld As Field For Each aFld In ActiveDocument.Fields Debug.Print aFld.Type & ": " & aFld.Code aFld.Update Next aFld End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#9
|
|||
|
|||
![]()
Guessed
Thank you. I will use your macro. But a serious question occurred. It maybe help me in solving my problem: What is 'Field' exactly? An 'In-Line with text' photo is field? What about 'tight' photo or 'square' photo? {Meanwhile I had to change the format of pictures (in the sample document) to 'In-Line with text' and 'tight'} |
#10
|
|||
|
|||
![]()
Guessed
Your macro Updates texts and 'In-Line with Text' pictures too. It works like 'Update Fields' exactly option. I want to Update just texts (especially Cross-refrences) |
#11
|
|||
|
|||
![]()
Guessed
Is there any macro to select JUST CHARACTERS in a complicated document? Thanks in advance. |
#12
|
||||
|
||||
![]()
Macros using selections are not a great idea and I haven't ever felt the need to use discontinuous selections for anything.
How about you specify the type of field you want to update. The sample document you posted had a bunch of pageref fields so you can update just those like this. It is simple to expand this macro to include or exclude other types of fields if you know what you want to do. Code:
Sub UpdateFields() Dim aFld As Field For Each aFld In ActiveDocument.Fields Debug.Print aFld.Type & ": " & aFld.Code If aFld.Type = wdFieldPageRef Then aFld.Update End If Next aFld End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#13
|
|||
|
|||
![]()
Guessed
Does this macro update all page references in sample document? |
#14
|
||||
|
||||
![]()
It is supposed to but in the sample document there are a bunch of broken refs since you only copied a sample of the text and some of the links are broken.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
Tags |
picture, style, text |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
spottedtapps | Outlook | 1 | 09-18-2014 07:03 PM |
Assigning templates to existing documents. Update Styles Enmasse. | bannerdog | Word | 1 | 02-28-2012 03:53 PM |
How do I type on multiple pics? | TimHudson | Drawing and Graphics | 0 | 07-28-2011 10:28 AM |
Customize Animation of several Pics on 1 slide | gburya | PowerPoint | 4 | 10-29-2010 01:18 PM |
![]() |
kpinks | Word | 1 | 08-24-2007 12:03 PM |