PDA

View Full Version : code needed



New_Learn
05-06-2022, 03:58 AM
Hi All,

Today I'm joined this forum. Hoping that I will get help on Word vba code..

For better understanding I will try to give you scenario.

File A - Existing word file with client details ABC.
File X - Template word file.

I want to copy file A data into file X. "X" file are stored at one location that is fix.
X file should get save as with client name available in file A.

In file A, from page 1 till last page every headings position and their value of position should get noted in variable's we create.
After having position number's, we will copy that every data to respective location in file X.

for e.g. on page 1, there are 10 item's which I need to copy and paste it in file X like below..

In file A
Client name - ABC
should get paste "ABC" in file X in front of client name position.

Renewal date - 01 May 2022 from file A should get paste in front of Renewal date of file X..


like this way I want to develop a code. Could anyone please help me here.. pls guide..

macropod
05-06-2022, 07:29 AM
Cross-posted at: https://www.mrexcel.com/board/threads/need-help-on-word-vba.1202945 - where you have already been given significant help.
Please read VBA Express' policy on Cross-Posting in Rule 3: http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3

New_Learn
05-06-2022, 08:40 AM
both are different things.. you please dont respond here.. I'm looking help from other User's or Experts.. Thank You..!!

SamT
05-07-2022, 12:18 PM
both are different thingsThey are both the same question.


I'm looking help from other User's or Experts
Paul is one of the best Word experts on the Internet.

If you don't like following the rules, you can get banned from all Forums. In fact, you just earned a one week ban from vbaexpress.

I hope to see you in one week.
SamT
Moderator.

Aussiebear
05-08-2022, 01:00 AM
Damn good thing I didn't get to this response earlier.... a "week" SamT? New_Learn you need to understand that your attitude is completely unacceptable. Paul is highly credentialed both with knowledge and with willingness to contribute to all forums to expand anyones knowledge. Paul, please accept our apologies for this unfortunate insult by a stupid novice.

macropod
05-08-2022, 06:43 AM
:thumb

Chas Kenyon
05-09-2022, 09:03 AM
Piling on.
Paul is very knowledgeable. He shares his expertise freely on a number of forums.
Sometimes he is a bit short with people who do not read what he says.
However, you should read the rule he linked (https://www.mrexcel.com/board/threads/need-help-on-word-vba.1202945). Read the follow-up link (https://www.excelguru.ca/content.php?184) as well. This is about courtesy to those people you want to help you.

Word vba and Excel vba are related and similar, they use the same structure, but, they are using a different object model. You cannot expect code that works great in Excel to run at all in Word without significant changes. Also, you should know that Word has different methods to hold data and bring it from one file or spot to another, including Mail Merge.