Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-16-2012, 03:26 PM
macropod's Avatar
macropod macropod is offline Extract phone number from word file Windows 7 64bit Extract phone number from word file Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I'm not sure what you mean by 'extra stuff' - the macro extracts 3 records from your dummy data. Although the first two have the same phone number, the other details differ.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 06-19-2012, 03:27 PM
donlincolnmsof donlincolnmsof is offline Extract phone number from word file Windows 7 64bit Extract phone number from word file Office 2003
Advanced Beginner
Extract phone number from word file
 
Join Date: Oct 2011
Posts: 36
donlincolnmsof is on a distinguished road
Default

Hello Paul

Thanks for the macro,

Just needed a bit of tweaking.

seems like when there is no phone numbers in the file, then the macro loose it block and grabs on to other data,

here is the modified data with number missing and if you run the macro on the below data, you will see how it grab the extra stuff.

Thanks.


rfn=Michael;fzp=95070;fst=CA;qn=;fln=;fph=;rst=CA; rzp=95070;lt=R;fad=15160+xy+zat+tlm;rln=dffdsfdsfs fd;rph=408+555-1212;rad=2343+sfdsf+dfsfsf;ord=232231701404?'
var tile = window.dfp_tile_count = window.dfp_tile_count ? ++window.dfp_tile_count : 1
url = url
.replace(/;ord=/, ";bt=" + rsi_data + ";ord=")
.replace(/;tile=\d*;/, ";tile=" + tile + ";")
document.write('\x3Cscript type="text/javascript" src="' + url + '" >\x3C/script>')
})()
</script>
</div>

<div class="ad ad_720x300 ad_under">
<script type="text/javascript">
(function () {
var dfd = 'dfadfadfada adsfadfa afadfafasd adfadffadf asdfa da adfafas
rfn=Michael;fzp=95070;fst=CA;qn=;fln=;fph=;rst=CA; rzp=95070;lt=R;fad=15160+xy+zat+tlm;rln=dffdsfdsfs fd;rph=408+555-1212;rad=2343+sfdsf+dfsfsf;ord=232231701404?'
var tile = window.dfp_tile_count = window.dfp_tile_count ? ++window.dfp_tile_count : 1
url = url
.replace(/;ord=/, ";bt=" + rsi_data + ";ord=")
.replace(/;tile=\d*;/, ";tile=" + tile + ";")
document.write('\x3Cscript type="text/javascript" src="' + url + '" >\x3C/script>')
})()
</script>
</div>
<div class="ad ad_970x1 ad_">
<script type="text/javascript">
(function () {
var url =
'fadsffafdf/N6794/adj/sfdsfs;sz=1x1;tile=2;pos=left;sid=wp.us;pgid=addre ss.results;fct=Saratoga;exact=0;xp=E;ffn=;rct=Saog a;rfn=Michael;fzp=12345;fst=CA;qn=;fln=;fph=;rst=C A; rzp=12345;lt=R;fad=15160+sdfd+dsfsdf+sfd;rln=sfdsf ;rph=;rad=25160+sfsdf+ssdfsd;ord=842231701404?'
var tile = window.dfp_tile_count = window.dfp_tile_count ? ++window.dfp_tile_count : 1
url = url
.replace(/;ord=/, ";bt=" + rsi_data + ";ord=")
.replace(/;tile=\d*;/, ";tile=" + tile + ";")
document.write('\x3Cscript type="text/javascript" src="' + url + '" >\x3C/script>')
})()
</script>
</div>

<div id="right">
<div class="ad ad_160x600-300x250-300x600 ad_top">
<script type="text/javascript">
(function () {
var url = 'sdfdfadfsfresults;sz=720x300;tile=11;pos=over;sid =wp.us;pgid=address.results;fct=meilroy;exact=0;xp =E;ffn=;rct=meilroy;rfn=Kim;fzp=84569;fst=CA;qn=;f ln=;fph=;rst=CA;rzp= 84569;lt=R;fad=2660+sdfdf+dsf;rln=Jang;rph=508+555-1212;rad=2660+sdfdsf+sdf;ord=7174278076361?'
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Extract phone number from word file Extract Video from .ppsx file designer PowerPoint 1 10-14-2011 08:00 AM
Extract phone number from word file Phone number formatting Mark Micallef Outlook 1 08-04-2010 02:38 PM
Can I Extract a Page from Word and Make a New DOCX File? tatihulot Word 1 06-20-2010 11:38 PM
in WORD, how do i type a 9-digit phone number "xxxxxxxxx" and have it automatically.. jay8962 Word 0 04-08-2010 11:08 AM
automatically extract footnotes into new file and apply character format to footnote hrdwa Word 0 02-27-2010 03:16 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:26 PM.


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