-
WSjweissmn1
AskWoody LoungerNovember 30, 2015 at 2:58 pm in reply to: Finding rows with a blank first cell and concatenating other cells in the row with the cell above #1539884Thank you!
-
WSjweissmn1
AskWoody LoungerNovember 27, 2015 at 11:45 am in reply to: Finding rows with a blank first cell and concatenating other cells in the row with the cell above #1539468English is amazingly slippery, isn’t it? Your code is a great direction-finder, Maud, and I can probably get from what you have to what I need. The relevant fields are text, and I need to pull the text from the lines beginning with blank cells into the nearest non-blank row above, by column. In the sample I’ve attached only one column (project scope) needs upward concatenation, but in real life more of them might. In any case, the problem is signaled by a blank in the first relevant column (the Master Project column).
Concatenation needs a space in between.
I’ve attached a sanitized sample file. The sheet named SummaryList is what I get from our external data source. What I want to get as a result is shown in SummaryList Desired.
Many thanks.
-
WSjweissmn1
AskWoody LoungerNovember 25, 2015 at 12:48 pm in reply to: Macro needed to generate an Abbreviations and Acronyms List for MS Word 2007 #1539127Also check out Paul Beverley’s set of editing macros: http://www.archivepub.co.uk/book.html
He includes several to deal with acronyms.
-
WSjweissmn1
AskWoody LoungerNovember 25, 2015 at 12:38 pm in reply to: Finding rows with a blank first cell and concatenating other cells in the row with the cell above #1539125I’ll have to sanitize it a bit, so will have it for you on Friday.
-
WSjweissmn1
AskWoody LoungerNovember 25, 2015 at 12:21 pm in reply to: Finding rows with a blank first cell and concatenating other cells in the row with the cell above #1539116Thanks for the confirmation. I was hoping for some kind of copy/filter magic. We have no control over how the stuff gets imported, alas, because it is coming from a third-party tool.
-
WSjweissmn1
AskWoody LoungerNovember 20, 2015 at 2:42 pm in reply to: Finding rows with a blank first cell and concatenating other cells in the row with the cell above #1538292I’ll take it that there’s no better solution than manually iterating upward. Or is the question insufficiently clear?
-
WSjweissmn1
AskWoody LoungerFebruary 28, 2015 at 6:21 am in reply to: Word 2010 macro stops execution after opening a file #1492872Thanks, Andrew! I
bet it worked on the other machine because I had fewer documents open and they all had the same template. For production I am going to isolate this routine in its own template and train the technical writers to switch templates temporarily or load an add-in. I’m lucky in that the other tech writers on hand are savvy enough to do that.
Anyway, I can make those code changes, and remember to avoid Selection when I can.
For what it’s worth, the replaceUnderline and unReplaceUnderline bits substitute unlikely strings for the underline character. It turns out that Word thinks that “OPS__detra” is a single word. The brute force way of stopping that was to temporarily eliminate underlines in the doc.
Is there another way to tell Word not to treat _ as a separator? Of course I need it to still treat periods, commas, colons, question marks and semicolons as separators.
– Jessica
-
WSjweissmn1
AskWoody LoungerFebruary 28, 2015 at 1:23 am in reply to: Word 2010 macro stops execution after opening a file #1492851The code resides in a template that remains open throughout execution. As soon as the second file opens, the macro stops executing. If the second file is already open, the macro works. Is there a way to open the second file without making it the active document?
Here it is:
Code:Sub ReplaceFromTableList2() Dim ChangeDoc as Document Dim RefDoc As Document Dim cTable As Table Dim oFind, oReplace As Range Dim I As Long Dim wasTracking As Boolean Dim sFname As String Dim dlgOpen As FileDialog Set dlgOpen = Application.FileDialog(FileDialogType:=msoFileDialogOpen) With dlgOpen .Filters.Clear .Filters.Add "Word Files", "*.docx" .AllowMultiSelect = False .Show On Error Resume Next sFname = .SelectedItems(1) End With On Error GoTo 0 If sFname = "" Then MsgBox "You didn't pick a file" Exit Sub End If 'sFname = "H:MacroscorrectionTable.docx" ' tried it with this statement rather than the file picker; didn't work either wasTracking = ActiveDocument.TrackRevisions 'Define the document to be processed Set RefDoc = ActiveDocument 'Open the document with the changes Set ChangeDoc = Documents.Open(sFname) ' quick check to make sure it is a good doc If ChangeDoc.Tables.Count = 0 Then MsgBox "There are no tables in the document you picked" ChangeDoc.Close wdDoNotSaveChanges 'close the bad doc Exit Sub End If 'Define the table to be used Set cTable = ChangeDoc.Tables(1) 'Activate the document to be processed RefDoc.Activate ActiveDocument.TrackRevisions = False replaceUnderline ActiveDocument.TrackRevisions = wasTracking For I = 1 To cTable.Rows.Count 'Define the cell containing the word/phrase to be replaced Set oFind = cTable.Cell(I, 1).Range oFind.End = oFind.End - 1 ' get rid of the table cell end marker 'Define the cell containing the replacement word/phrase Set oReplace = cTable.Cell(I, 2).Range oReplace.End = oReplace.End - 1 ' get rid of the table cell end marker With Selection 'Start at the top of the document .HomeKey wdStory 'Replace the words/phrases With .Find .ClearFormatting ' .Replacement.ClearFormatting .Execute findtext:=oFind, replacewith:=oReplace, Replace:=wdReplaceAll, MatchWholeWord:=True, MatchWildcards:=False, MatchCase:=True, Forward:=True, Wrap:=wdFindContinue End With End With Next I ActiveDocument.TrackRevisions = False unreplaceUnderline ActiveDocument.TrackRevisions = wasTracking 'Close the document with the table ChangeDoc.Close wdDoNotSaveChanges end sub
-
WSjweissmn1
AskWoody LoungerJanuary 6, 2015 at 12:56 pm in reply to: Relative link to Excel spreadsheet with macro problem #1483419Have you tried using application.DisplayAlerts = False ?
This shuts off all alerts. It’s best to turn it back on at the end of the macro via
Application.DisplayAlerts = True
-
WSjweissmn1
AskWoody LoungerAugust 27, 2014 at 9:15 am in reply to: Table name in a variable for an advanced filter copy in an Excel 2010 macro #1465299Right. I should have marked that the problem is solved. I figured out another approach.
-
WSjweissmn1
AskWoody LoungerYes, that’s the one that replaced the one that showed event order. It is illuminating about the whole topic, and I hope it helps others.
And thanks for the DoEvents hint. That may be the key.
Also, it seems that even for connections that are based on web queries all I need is a simple refresh of the connection, without having to refresh the query table. That would be good.
-
WSjweissmn1
AskWoody LoungerJuly 11, 2014 at 2:18 pm in reply to: Reference to specific table cell from outside the table #1459287Hmm. It seems that if you there is a named range that is not a table (but used to be), the values in the first row are shown in the formula builder as though they are column names. But they are not, and don’t work as though they were. In a real table things work as expected without the need to specify a row explicitly.
-
WSjweissmn1
AskWoody LoungerJuly 11, 2014 at 1:19 pm in reply to: Reference to specific table cell from outside the table #1459281Thanks – what I can’t seem to do is use the Table_Name[Column Name] format with anything else after the ] to specify which row I mean.
Let’s say I have a table on one sheet named “Pointless_Table_Copy” with columns named:
Mproj, MyTask, State
A table named “Task_List_Filtered” on the other sheet has columns named:
Master Project, SomethingUseless, Task, TheState
I want to write a formula that fills the cells of Pointless_Table_Copy so that the first cell in column MyProj has the value of the first cell in
Master Project, the second cell in MyProj has the same value as the second cell in Master Project, and so on down the column and across the rows.I can do it easily with references based on the sheet name and all, but I thought there must be a way to do it with a table reference as well.
-
WSjweissmn1
AskWoody LoungerAs so often happens I solved the problem myself. I didn’t notice the Properties for data connections, which are conveniently NOT in the Connection box. One of the properties specifies what happens when an extract pulls a different number of rows. I set it to clear things and all is well.
-
WSjweissmn1
AskWoody LoungerIt is working as designed. Style changes and additions in a template don’t apply to existing documents, just to new documents. You must add the new style to each document individually by copying it from the template.
Go into the Developer tab, select Document Template, and select Organizer. There you can copy styles from the template into the document.
OR you can set the template for the document again, with the Automatically update document styles checkbox checked.
![]() |
Patch reliability is unclear, but widespread attacks make patching prudent. Go ahead and patch, but watch out for potential problems. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Remove a User from Login screen
by
CWBillow
29 minutes ago -
TikTok fined €530 million for sending European user data to China
by
Nibbled To Death By Ducks
1 hour, 39 minutes ago -
Microsoft Speech Recognition Service Error Code 1002
by
stanhutchings
7 hours, 43 minutes ago -
Best and easiest way to Split PST File (Awaiting moderation)
by
Jamesjackson0847
4 hours, 5 minutes ago -
Is it a bug or is it expected?
by
Susan Bradley
6 hours, 38 minutes ago -
Image for Windows TBwinRE image not enough space on target location
by
bobolink
4 hours, 16 minutes ago -
Start menu jump lists for some apps might not work as expected on Windows 10
by
Susan Bradley
12 hours, 16 minutes ago -
Malicious Go Modules disk-wiping malware
by
Alex5723
1 hour, 52 minutes ago -
Multiple Partitions?
by
CWBillow
2 hours, 32 minutes ago -
World Passkey Day 2025
by
Alex5723
19 hours, 52 minutes ago -
Add serial device in Windows 11
by
Theodore Dawson
1 day, 11 hours ago -
Windows 11 users reportedly losing data due forced BitLocker encryption
by
Alex5723
7 hours, 45 minutes ago -
Cached credentials is not a new bug
by
Susan Bradley
1 day, 15 hours ago -
Win11 24H4 Slow!
by
Bob Bible
1 day, 15 hours ago -
Microsoft hiking XBox prices starting today due to Trump’s tariffs
by
Alex5723
1 day, 13 hours ago -
Asus adds “movement sensor” to their Graphics cards
by
n0ads
1 day, 18 hours ago -
‘Minority Report’ coming to NYC
by
Alex5723
1 day, 14 hours ago -
Apple notifies new victims of spyware attacks across the world
by
Alex5723
2 days, 2 hours ago -
Tracking content block list GONE in Firefox 138
by
Bob99
2 days, 2 hours ago -
How do I migrate Password Managers
by
Rush2112
1 day, 9 hours ago -
Orb : how fast is my Internet connection
by
Alex5723
1 day, 11 hours ago -
Solid color background slows Windows 7 login
by
Alex5723
2 days, 14 hours ago -
Windows 11, version 24H2 might not download via Windows Server Updates Services
by
Alex5723
2 days, 12 hours ago -
Security fixes for Firefox
by
Susan Bradley
1 day, 13 hours ago -
Notice on termination of services of LG Mobile Phone Software Updates
by
Alex5723
3 days, 1 hour ago -
Update your Apple Devices Wormable Zero-Click Remote Code Execution in AirPlay..
by
Alex5723
3 days, 10 hours ago -
Amazon denies it had plans to be clear about consumer tariff costs
by
Alex5723
3 days, 1 hour ago -
Return of the brain dead FF sidebar
by
EricB
2 days, 12 hours ago -
Windows Settings Managed by your Organization
by
WSDavidO61
1 day, 15 hours ago -
Securing Laptop for Trustee Administrattor
by
PeachesP
17 hours, 23 minutes ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.