Results 1 to 4 of 4
  1. #1
    liner
    Guest
    In other posts I asked for help on how to import a huge Excel file as a table in Word. Well, that's done albeit with a lot of fussing around. Now for the next problem.

    I found at least one cell that is empty. Is there a way to search for an empty cell in a Word table? As usual, I have only the resources from Microsoft office. I cannot download any new software per our network security settings.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Wouldn't it be easier to do that in Excel, before importing?

    The following macro will select the first empty cell it encounters in the first table in the document. It might be slow of the table is large.

    Code:
    Sub FindEmptyCell()
      Dim oCell As Cell
      ActiveDocument.Tables(1).Select
      For Each oCell In Selection.Cells
    	If Len(oCell.Range.Text) = 2 Then
    	  oCell.Select
    	  Exit Sub
    	End If
      Next oCell
    End Sub

  3. #3
    liner
    Guest
    [quote name='HansV' post='783785' date='09-Jul-2009 10:04']Wouldn't it be easier to do that in Excel, before importing?[/quote]

    Good question. And in fact it was empty; and at least for my usage, "end" and down arrow gets me there quickly.

    But I still worry that things were not fully imported. Such has been known to happen, so I still wonder if there is a way to search in Word.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    The macro I posted could be a starting point.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •