Page number in citation only when necessary

I’m struggling to figure out how to have page numbers in my in-text citations when I need them but not when I dont. When i need to quote something, according to the referencing style i’m using which is Harvard I need to have the page number in the in-text citation eg ‘Kelly, 2007, p.9’ 

However for most references i dont need the page number and it’s displaying as ‘Kelly, 2007, p.’ 

How do I get the ‘p.’ to only show if there is a page number actually filled in for that reference? I’m really hoping I dont have to go back and manaually change them all HELP

You want your citation to look like this, except that the * should be “link adjacent text” characters which look like tiny tiny diamonds in endnote, and are available from the “insert fields” drop down list.  the p.^pp. will use the appropriate choice if you have one page or multiple pages.  The | characters are added ensurance that the comma won’t be included when there aren’t any page numbers, and are called “force separation” in the insert fields dropdown, but you can also use the keyboard pipe symbol.  (the link adjacent characters do not copy and paste to a message here, hence the need to give the long explanation!)

(Author*|Year|,*p.^pp.*Cited Pages|)

Thanks so much for your speedy response Leanne. My formatting seemed to already be what you had suggested unless i’m missing something subtle which is possible since i find this so confusing! Unfortunately it doesnt seem to rectify things. References where I dont actually need a page number and havent imnputted one, still show the p. except now its p.^pp (see attached pictures). I really appreciate your help if you have any further suggestions

Endnote 1.JPG

Those characters don’t look exactly the same as mine do.  See image and I attach a copy of an output style (in a zip folder, because the forum won’t allow style file attachment types!) with the right characters,  Try opening it (it is in the zipped folder) in endnote and carefully copy and paste it into your citation template. (3.75 KB)

Thanks so much. I have done as you said and still am getting the p. showing and now, even when i only cite one page number, the p.^pp. comes up (see pics). I’m puzzled

Endnote 4.JPG
Endnote 6.JPG
Endote 5.JPG

Have you saved the output style to a new name and then ensured that your word document is using the new one.  You are still seeing a non-breaking space rather than the “link adjacent text” symbol I see on windows though.  

Oh my god sorry it worked!! Sorry it seemed to take a while to update when i updated the citations. Thank you soooo much!!

yay!  I was in the process of making the correction to the Harvard style which is also attached!  

Harvard (2.9 KB)

Hi Leanne - i was wondering if you could help with another query! In my bibliography, i want a chapter of an edited book to show up like this below with the ‘ed.’ or if plural ‘ed.’ in brackets

Franklin, A.W. (2012). ‘Management of the problem’, in Smith, S.M. (ed.) The maltreatment of children. Lancaster: MTP, pp. 83-95.

Currently endnote displays it like this without a bracket:

Chiesa, M. (1993) ‘At a crossroad between institutional and community psychiatry: an acute psychiatric admission ward’ in Hinshelwood, R. D. and Skogstad, W., eds., Observing Organisations: Anxiety, defence and culture in health care, London: Brunner-Routledge, 54-67.

I attach a screenshot of the output style for a Book Section and Edited book as both should have brackets like this. Sorry this is probably simple but i’m clueless!!

not obvious but it should be like this

Editor (ed.)^(eds.)|