The Wiener index W (G) of a graph G is the sum of distances between all vertices of G. The Wiener index of a family of connected graphs is defined as the sum of the Wiener indices of its members. Two families of graphs can be constructed by identifying a fixed vertex of an arbitrary graph F with vertices or subdivision vertices of an arbitrary tree T of order n. Let Gv be a graph obtained by identifying a fixed vertex of F with a vertex v of T . The first family V = fGv j v 2 V (T )g contains n graphs. Denote by Gve a graph obtained by identifying the same fixed vertex of F with the subdivision vertex ve of an edge e in T . The second family E = fGve j e 2 E(T )g contains n 1 graphs. It is proved that W (V) = W (E) if and only if W (F ) = 2W (T ).