Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2021, 03:01 AM
Joanne Joanne is offline Hyphens in Sort Code not appearing in mail merged Word document Windows 7 32bit Hyphens in Sort Code not appearing in mail merged Word document Office 2010 32bit
Advanced Beginner
Hyphens in Sort Code not appearing in mail merged Word document
 
Join Date: Jul 2013
Posts: 58
Joanne is on a distinguished road
Default Hyphens in Sort Code not appearing in mail merged Word document

Good morning



I have a mail merged Word document which shows bank account number and sort code. I would like the digits in the sort code separated by hyphens (12-34-56).

My mergefield shows as {MERGEFIELD F12\#"00-00-00"}

Can someone please tell what I need to change to get this to work?

Many thanks.
Reply With Quote
  #2  
Old 11-11-2021, 05:16 AM
gmayor's Avatar
gmayor gmayor is offline Hyphens in Sort Code not appearing in mail merged Word document Windows 10 Hyphens in Sort Code not appearing in mail merged Word document Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

How is the number represented in the data source i.e. what does { MERGEFIELD F12 } produce?
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 11-11-2021, 05:21 AM
Joanne Joanne is offline Hyphens in Sort Code not appearing in mail merged Word document Windows 7 32bit Hyphens in Sort Code not appearing in mail merged Word document Office 2010 32bit
Advanced Beginner
Hyphens in Sort Code not appearing in mail merged Word document
 
Join Date: Jul 2013
Posts: 58
Joanne is on a distinguished road
Default

Quote:
Originally Posted by gmayor View Post
How is the number represented in the data source i.e. what does { MERGEFIELD F12 } produce?
F12 is the bank's sort code. The cell contains 6 numeric digits - 00-00-00
Reply With Quote
  #4  
Old 11-11-2021, 07:15 AM
Joanne Joanne is offline Hyphens in Sort Code not appearing in mail merged Word document Windows 7 32bit Hyphens in Sort Code not appearing in mail merged Word document Office 2010 32bit
Advanced Beginner
Hyphens in Sort Code not appearing in mail merged Word document
 
Join Date: Jul 2013
Posts: 58
Joanne is on a distinguished road
Default

It picks up the information from an Excel spreadsheet. The cells formatted to "Custom" numbering.
Reply With Quote
  #5  
Old 11-12-2021, 02:31 AM
gmayor's Avatar
gmayor gmayor is offline Hyphens in Sort Code not appearing in mail merged Word document Windows 10 Hyphens in Sort Code not appearing in mail merged Word document Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,101
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You didn't answer the question -'What does { MERGEFIELD F12 } produce?' i.e. what is the underlying value in the cell. How it is formatted in Excel is not relevant as Word ignores the formatting.

If the value in the cell is 00-00-00 then that's what the merge should produce.
If the value in the cell is (say) 265476 then you need { MERGEFIELD F12 \# "00'-'00'-'00" }
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hyphens in Sort Code not appearing in mail merged Word document changing drop down menus in a mail-merged document Taras49 Word 4 02-27-2017 11:30 AM
Hyphens in Sort Code not appearing in mail merged Word document Mail merged document and page numbers for table of contents jab40 Mail Merge 20 04-07-2016 08:25 AM
Hyphens in Sort Code not appearing in mail merged Word document Cannot get macro button to sort with merged cells on sheet lonniepoet Excel Programming 3 02-04-2016 04:33 PM
Hyphens in Sort Code not appearing in mail merged Word document decimal numbers not appearing properly in merged document paulys Mail Merge 2 08-06-2012 08:15 AM
saving a mail merged document after the user edits it. kosh2 Mail Merge 0 08-05-2011 03:35 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft