![]() |
#1
|
|||
|
|||
![]() Good morning, Everyone. I'm having the issue of copying and pasting the borderlines (above and below) the Doc's properties (Publish Date) .. Can anyone please help? Here is what it looks like 110520.png Thanks, An Nguyen |
#2
|
|||
|
|||
![]()
The borders are not part of the content control. Did you insert the content control in a table?
|
#3
|
|||
|
|||
![]()
It is part of a document that I need to copy and paste to new document.
Is that answering the question? More details: - need to copy "Publish Date" property the has 2 border-lines (above and below) as seen in attachment - and paste to replace the "Publish Date" property without 2 border-lines (above and below) of a new document. - they both has different FRONT format. Thanks, An Nguyen |
#4
|
|||
|
|||
![]() Quote:
To copy the borders you need to know where the borders come from so that you know what to copy. Are they part of a table? Are they part of a paragraph style? Have they been added manually to the text? If not part of a table you'll need to copy the entire paragraph that the content control is in. |
#5
|
|||
|
|||
![]()
Both documents are opened from templates, and they have in different Header, Footer, and Publish Date in format (color font style etc.).
"Are they part of a table? Are they part of a paragraph style? Have they been added manually to the text?" How do I find out the answer for one of your questions above? Thanks, An Nguyen |
#6
|
|||
|
|||
![]()
Given that you have posted this question in the VBA forum I assume that you are attempting to write code to do this.
Why are you attempting to write code before you even know how to use Word? How can you expect to successfully automate an application that you don't know how to use? |
#7
|
|||
|
|||
![]()
good morning.
Very good question there. I know very basic about word before entering into this task with VBA it's the job, and I must find the way to challenge it. And I am sorry for having some kind of ** stupid ** questions so far. Thanks, An Nguyen |
#8
|
|||
|
|||
![]()
They're not stupid questions. I'm just concerned that you are attempting to perform an expert level task when you are still only a novice. It is like attempting to run before you've learned to crawl.
VBA code simply automates the Office applications, so it is imperative that you have a good grounding in how those applications work and how they are used. As I have just realised that you are using macOS I am not going to be able to help you as I don't have access to a mac version of Word to guide you through the interface. As it is for your job, do you have any co-workers with a better knowledge of Word that can guide you? |
#9
|
|||
|
|||
![]()
Good news.
I went through all your suggestions, and found that Copy the entire Paragraph works ![]() That's awesome. Thanks!!! |
#10
|
|||
|
|||
![]() Quote:
I'd had never worked with MS WORD VBA. Also with Word, let say I am a user and more like a reader than a creator. No one in the team knows Word-VBA. I have to self starting from ground zero. picking up piece by piece and put it together. With you help so far, I've made the application runs and works ![]() This copying paths are for the next level. By the way. I am having my Laptop with Win11 now. Thanks, An Nguyen |
#11
|
|||
|
|||
![]()
I wasn't suggesting that you would have colleagues that know Word VBA, but you may have colleagues that have more experience of using Word to create documents. It is their knowledge that you need to gain.
Your first task should be to examine the templates you need to work with in the Word UI. If your cursor is in a table you will see two extra tabs in the ribbon, Table Design and Table Layout. In this case you may need to copy the table. You should also see Range.Information property (Word) | Microsoft Learn To check whether the borders are part of the style you will need to display the styles pane (Alt+Ctrl+Shift+S) where you will see the style in use at the cursor position highlighted. Right click on the style name and choose Modify. In the dialog click Format then Borders. If the style has borders you will see them. If the borders have been added manually you can check the Borders and Shading dialog. In either of the last two cases you will probably need to copy the entire paragraph. It's difficult to say for certain as your screenshot doesn't show anything useful. |
#12
|
|||
|
|||
![]()
Oh My..
Thank you so much for the details. I've found that there's no table in the template, and the borders are really in style. Also, sorry for missing information on the screenshot since i need to protect the internal detail of the project. Your helps have been appreciated. Thanks, An Nguyen |
#13
|
|||
|
|||
![]()
You can avoid use of the clipboard by using Range.FormattedText property (Word) | Microsoft Learn
|
#14
|
|||
|
|||
![]()
Thanks!!! i will give it a try.
|
#15
|
|||
|
|||
![]() Quote:
it's work nicely with original format from the source. -An |
![]() |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro to copy and paste answers from the end of the document | punk1234567890 | Word VBA | 1 | 02-21-2022 03:51 PM |
![]() |
gasparik | Word VBA | 1 | 05-11-2020 05:41 AM |
![]() |
Ilmari | Word VBA | 2 | 05-05-2020 12:08 AM |
Font changes when I copy/paste one document into another | RobertWA | Word | 3 | 03-25-2019 06:13 AM |
Is it possible to copy & paste Table of Contents out of one document into another? | mikey386 | Word | 4 | 12-18-2014 08:45 AM |