Wildcard to Find and Replace with fields?

In Word 2007 I'm editing a paper which contains EndNote citation fields, and 
in the course of switching the paper to a different bibliographic style I 
need to find and replace any space that occurs before a citation. Each 
citation exists in the document as a field in Word. 

With field codes toggled on, when I do a simple Find for ^d Word finds each 
field with no trouble, but when I switch on "Use wildcards" and try the 
syntax 
Find: ( )(^d) - and I have also tried ( )([^d])
I get an error message saying that ^d is not supported when the Wildcards 
check box is selected.

Can anyone help me with Find and replace syntax that will work for this task?

0
Utf
5/18/2010 9:39:01 PM
word.docmanagement 5542 articles. 2 followers. Follow

14 Replies
1026 Views

Similar Articles

[PageSpeed] 40

I am not sure what you mean by EndNote citation fields.  If you use Alt+F9 
to toggle on the display of field codes in the Word document, what do you 
see in place of the fields that you want to modify?

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
> In Word 2007 I'm editing a paper which contains EndNote citation fields, 
> and
> in the course of switching the paper to a different bibliographic style I
> need to find and replace any space that occurs before a citation. Each
> citation exists in the document as a field in Word.
>
> With field codes toggled on, when I do a simple Find for ^d Word finds 
> each
> field with no trouble, but when I switch on "Use wildcards" and try the
> syntax
> Find: ( )(^d) - and I have also tried ( )([^d])
> I get an error message saying that ^d is not supported when the Wildcards
> check box is selected.
>
> Can anyone help me with Find and replace syntax that will work for this 
> task?
> 
0
Doug
5/18/2010 9:59:15 PM
Thanks for picking this up.

EndNote bibliographical software, through the EndNote add-in for Word, 
inserts in-text bibliographical citations in a Word document as fields. 

I'm not concerned at this stage with modifying any fields, Switching to a 
different bibliographical style (not to be confused with Word's formatting 
styles) is a procedure that EndNote takes care without any difficulty. My 
problem is just with finding the fields so that I can delete the 
now-extraneous space (in the ordinary Word text, not the field) that in most 
instances exists immediately before the point where the field has been 
inserted. In other words I want to bring these fields up against the 
preceding text - where previously they were inserted with a space between 
them and the preceding text. 

But Word doesn't let me find ANY fields using wildcards. There are also 
other fields in the document, like hyperlinks and a table of Contents, and 
when Use Wildcards is checked ^d doesn't find them either. (Without 
Wildcards, ^d finds all of them.)

When the field codes are displayed, all of them (the citation entries and 
the hyperlinks and what have you) are enclosed in the usual curly brackets. I 
also tried just searching for spaces before curly brackets, but Field Code 
brackets don't seem to be findable with Find and replace.

Does this information help?


"Doug Robbins - Word MVP" wrote:

> I am not sure what you mean by EndNote citation fields.  If you use Alt+F9 
> to toggle on the display of field codes in the Word document, what do you 
> see in place of the fields that you want to modify?
> 
> -- 
> Hope this helps.
> 
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
> 
> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
> 
> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
> > In Word 2007 I'm editing a paper which contains EndNote citation fields, 
> > and
> > in the course of switching the paper to a different bibliographic style I
> > need to find and replace any space that occurs before a citation. Each
> > citation exists in the document as a field in Word.
> >
> > With field codes toggled on, when I do a simple Find for ^d Word finds 
> > each
> > field with no trouble, but when I switch on "Use wildcards" and try the
> > syntax
> > Find: ( )(^d) - and I have also tried ( )([^d])
> > I get an error message saying that ^d is not supported when the Wildcards
> > check box is selected.
> >
> > Can anyone help me with Find and replace syntax that will work for this 
> > task?
> > 
0
Utf
5/18/2010 11:16:08 PM
If you will tell me what appears when you toggle on the display of the field 
codes AND where the space that you want to delete is located with respect to 
the { } field delimiters then I can probably help you.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:0AC0A34B-2AA9-497A-ACF9-96430D899AAE@microsoft.com...
> Thanks for picking this up.
>
> EndNote bibliographical software, through the EndNote add-in for Word,
> inserts in-text bibliographical citations in a Word document as fields.
>
> I'm not concerned at this stage with modifying any fields, Switching to a
> different bibliographical style (not to be confused with Word's formatting
> styles) is a procedure that EndNote takes care without any difficulty. My
> problem is just with finding the fields so that I can delete the
> now-extraneous space (in the ordinary Word text, not the field) that in 
> most
> instances exists immediately before the point where the field has been
> inserted. In other words I want to bring these fields up against the
> preceding text - where previously they were inserted with a space between
> them and the preceding text.
>
> But Word doesn't let me find ANY fields using wildcards. There are also
> other fields in the document, like hyperlinks and a table of Contents, and
> when Use Wildcards is checked ^d doesn't find them either. (Without
> Wildcards, ^d finds all of them.)
>
> When the field codes are displayed, all of them (the citation entries and
> the hyperlinks and what have you) are enclosed in the usual curly 
> brackets. I
> also tried just searching for spaces before curly brackets, but Field Code
> brackets don't seem to be findable with Find and replace.
>
> Does this information help?
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> I am not sure what you mean by EndNote citation fields.  If you use 
>> Alt+F9
>> to toggle on the display of field codes in the Word document, what do you
>> see in place of the fields that you want to modify?
>>
>> -- 
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>>
>> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
>> message
>> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
>> > In Word 2007 I'm editing a paper which contains EndNote citation 
>> > fields,
>> > and
>> > in the course of switching the paper to a different bibliographic style 
>> > I
>> > need to find and replace any space that occurs before a citation. Each
>> > citation exists in the document as a field in Word.
>> >
>> > With field codes toggled on, when I do a simple Find for ^d Word finds
>> > each
>> > field with no trouble, but when I switch on "Use wildcards" and try the
>> > syntax
>> > Find: ( )(^d) - and I have also tried ( )([^d])
>> > I get an error message saying that ^d is not supported when the 
>> > Wildcards
>> > check box is selected.
>> >
>> > Can anyone help me with Find and replace syntax that will work for this
>> > task?
>> > 
0
Doug
5/19/2010 1:38:26 AM
Word itself does not use fields for endnotes.The fields presumably are 
inserted via your EndNote software, however quickly checking at Google there 
are several EndNote packages, hence Doug's request to learn exactly what 
your endnote software inserts that you wish to find. It is simple enough to 
locate fields using vba, provided you know what the field construction is. 
What exactly appears between the curly brackets {}?

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
..


"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:0AC0A34B-2AA9-497A-ACF9-96430D899AAE@microsoft.com...
> Thanks for picking this up.
>
> EndNote bibliographical software, through the EndNote add-in for Word,
> inserts in-text bibliographical citations in a Word document as fields.
>
> I'm not concerned at this stage with modifying any fields, Switching to a
> different bibliographical style (not to be confused with Word's formatting
> styles) is a procedure that EndNote takes care without any difficulty. My
> problem is just with finding the fields so that I can delete the
> now-extraneous space (in the ordinary Word text, not the field) that in 
> most
> instances exists immediately before the point where the field has been
> inserted. In other words I want to bring these fields up against the
> preceding text - where previously they were inserted with a space between
> them and the preceding text.
>
> But Word doesn't let me find ANY fields using wildcards. There are also
> other fields in the document, like hyperlinks and a table of Contents, and
> when Use Wildcards is checked ^d doesn't find them either. (Without
> Wildcards, ^d finds all of them.)
>
> When the field codes are displayed, all of them (the citation entries and
> the hyperlinks and what have you) are enclosed in the usual curly 
> brackets. I
> also tried just searching for spaces before curly brackets, but Field Code
> brackets don't seem to be findable with Find and replace.
>
> Does this information help?
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> I am not sure what you mean by EndNote citation fields.  If you use 
>> Alt+F9
>> to toggle on the display of field codes in the Word document, what do you
>> see in place of the fields that you want to modify?
>>
>> -- 
>> Hope this helps.
>>
>> Please reply to the newsgroup unless you wish to avail yourself of my
>> services on a paid consulting basis.
>>
>> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>>
>> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
>> message
>> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
>> > In Word 2007 I'm editing a paper which contains EndNote citation 
>> > fields,
>> > and
>> > in the course of switching the paper to a different bibliographic style 
>> > I
>> > need to find and replace any space that occurs before a citation. Each
>> > citation exists in the document as a field in Word.
>> >
>> > With field codes toggled on, when I do a simple Find for ^d Word finds
>> > each
>> > field with no trouble, but when I switch on "Use wildcards" and try the
>> > syntax
>> > Find: ( )(^d) - and I have also tried ( )([^d])
>> > I get an error message saying that ^d is not supported when the 
>> > Wildcards
>> > check box is selected.
>> >
>> > Can anyone help me with Find and replace syntax that will work for this
>> > task?
>> > 


0
Graham
5/19/2010 5:03:54 AM
Thanks for all replies.

I avoided saying what's inside the curly brackets because when the fields 
are displayed they tend to be very long. But in the case of the EndNote 
citation fields, each one begins with "{ ADDIN EN.CITE <EndNote><Cite>", 
followed by lots more stuff, and ending with "</Cite></EndNote>}". 

Maybe there isn't a way to do wildcard find and replace for fields 
generically, and probably not something one would really need, but it would 
be handy to be able to use it with EndNote fields, which I frequently work 
with.

A kind of workaround for me meanwhile is simply to Find each citation by 
jumping from one to the next using Browse by Field on the scrollbar, but it 
would save time to be able to Find AND Replace, and I would welcome a 
suggestion of code that could do it programatically.



"Graham Mayor" wrote:

> Word itself does not use fields for endnotes.The fields presumably are 
> inserted via your EndNote software, however quickly checking at Google there 
> are several EndNote packages, hence Doug's request to learn exactly what 
> your endnote software inserts that you wish to find. It is simple enough to 
> locate fields using vba, provided you know what the field construction is. 
> What exactly appears between the curly brackets {}?
> 
> -- 
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
> 
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> ..
> 
> 
> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
> news:0AC0A34B-2AA9-497A-ACF9-96430D899AAE@microsoft.com...
> > Thanks for picking this up.
> >
> > EndNote bibliographical software, through the EndNote add-in for Word,
> > inserts in-text bibliographical citations in a Word document as fields.
> >
> > I'm not concerned at this stage with modifying any fields, Switching to a
> > different bibliographical style (not to be confused with Word's formatting
> > styles) is a procedure that EndNote takes care without any difficulty. My
> > problem is just with finding the fields so that I can delete the
> > now-extraneous space (in the ordinary Word text, not the field) that in 
> > most
> > instances exists immediately before the point where the field has been
> > inserted. In other words I want to bring these fields up against the
> > preceding text - where previously they were inserted with a space between
> > them and the preceding text.
> >
> > But Word doesn't let me find ANY fields using wildcards. There are also
> > other fields in the document, like hyperlinks and a table of Contents, and
> > when Use Wildcards is checked ^d doesn't find them either. (Without
> > Wildcards, ^d finds all of them.)
> >
> > When the field codes are displayed, all of them (the citation entries and
> > the hyperlinks and what have you) are enclosed in the usual curly 
> > brackets. I
> > also tried just searching for spaces before curly brackets, but Field Code
> > brackets don't seem to be findable with Find and replace.
> >
> > Does this information help?
> >
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> I am not sure what you mean by EndNote citation fields.  If you use 
> >> Alt+F9
> >> to toggle on the display of field codes in the Word document, what do you
> >> see in place of the fields that you want to modify?
> >>
> >> -- 
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
> >>
> >> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
> >> message
> >> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
> >> > In Word 2007 I'm editing a paper which contains EndNote citation 
> >> > fields,
> >> > and
> >> > in the course of switching the paper to a different bibliographic style 
> >> > I
> >> > need to find and replace any space that occurs before a citation. Each
> >> > citation exists in the document as a field in Word.
> >> >
> >> > With field codes toggled on, when I do a simple Find for ^d Word finds
> >> > each
> >> > field with no trouble, but when I switch on "Use wildcards" and try the
> >> > syntax
> >> > Find: ( )(^d) - and I have also tried ( )([^d])
> >> > I get an error message saying that ^d is not supported when the 
> >> > Wildcards
> >> > check box is selected.
> >> >
> >> > Can anyone help me with Find and replace syntax that will work for this
> >> > task?
> >> > 
> 
> 
> .
> 
0
Utf
5/19/2010 7:10:01 AM
Forgot to add that the space I wish to remove is any space that comes 
immediately before the first opening curly bracket (i.e. before the insertion 
point of the citation). Sometimes there is no space before the insertion 
point, in which case there's nothing I need to do.

"Graham Mayor" wrote:

> Word itself does not use fields for endnotes.The fields presumably are 
> inserted via your EndNote software, however quickly checking at Google there 
> are several EndNote packages, hence Doug's request to learn exactly what 
> your endnote software inserts that you wish to find. It is simple enough to 
> locate fields using vba, provided you know what the field construction is. 
> What exactly appears between the curly brackets {}?
> 
> -- 
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
> 
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> ..
> 
> 
> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
> news:0AC0A34B-2AA9-497A-ACF9-96430D899AAE@microsoft.com...
> > Thanks for picking this up.
> >
> > EndNote bibliographical software, through the EndNote add-in for Word,
> > inserts in-text bibliographical citations in a Word document as fields.
> >
> > I'm not concerned at this stage with modifying any fields, Switching to a
> > different bibliographical style (not to be confused with Word's formatting
> > styles) is a procedure that EndNote takes care without any difficulty. My
> > problem is just with finding the fields so that I can delete the
> > now-extraneous space (in the ordinary Word text, not the field) that in 
> > most
> > instances exists immediately before the point where the field has been
> > inserted. In other words I want to bring these fields up against the
> > preceding text - where previously they were inserted with a space between
> > them and the preceding text.
> >
> > But Word doesn't let me find ANY fields using wildcards. There are also
> > other fields in the document, like hyperlinks and a table of Contents, and
> > when Use Wildcards is checked ^d doesn't find them either. (Without
> > Wildcards, ^d finds all of them.)
> >
> > When the field codes are displayed, all of them (the citation entries and
> > the hyperlinks and what have you) are enclosed in the usual curly 
> > brackets. I
> > also tried just searching for spaces before curly brackets, but Field Code
> > brackets don't seem to be findable with Find and replace.
> >
> > Does this information help?
> >
> >
> > "Doug Robbins - Word MVP" wrote:
> >
> >> I am not sure what you mean by EndNote citation fields.  If you use 
> >> Alt+F9
> >> to toggle on the display of field codes in the Word document, what do you
> >> see in place of the fields that you want to modify?
> >>
> >> -- 
> >> Hope this helps.
> >>
> >> Please reply to the newsgroup unless you wish to avail yourself of my
> >> services on a paid consulting basis.
> >>
> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
> >>
> >> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
> >> message
> >> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
> >> > In Word 2007 I'm editing a paper which contains EndNote citation 
> >> > fields,
> >> > and
> >> > in the course of switching the paper to a different bibliographic style 
> >> > I
> >> > need to find and replace any space that occurs before a citation. Each
> >> > citation exists in the document as a field in Word.
> >> >
> >> > With field codes toggled on, when I do a simple Find for ^d Word finds
> >> > each
> >> > field with no trouble, but when I switch on "Use wildcards" and try the
> >> > syntax
> >> > Find: ( )(^d) - and I have also tried ( )([^d])
> >> > I get an error message saying that ^d is not supported when the 
> >> > Wildcards
> >> > check box is selected.
> >> >
> >> > Can anyone help me with Find and replace syntax that will work for this
> >> > task?
> >> > 
> 
> 
> .
> 
0
Utf
5/19/2010 7:24:01 AM
The following macro should then work

Dim oField As Field
Dim oRng As Range
For Each oField In ActiveDocument.Fields
    If InStr(1, oField.Code, "ADDIN EN.CITE") Then
        oField.Select
        Selection.Collapse wdCollapseStart
        Set oRng = Selection.Range
        oRng.MoveStart wdCharacter, -1
        If oRng.Text = " " Then
           oRng.Delete
        End If
    End If
Next oField

http://www.gmayor.com/installing_macro.htm

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:D3D0E9E0-F962-4B41-BDD4-397CC558E943@microsoft.com...
>
> Forgot to add that the space I wish to remove is any space that comes
> immediately before the first opening curly bracket (i.e. before the 
> insertion
> point of the citation). Sometimes there is no space before the insertion
> point, in which case there's nothing I need to do.
>
> "Graham Mayor" wrote:
>
>> Word itself does not use fields for endnotes.The fields presumably are
>> inserted via your EndNote software, however quickly checking at Google 
>> there
>> are several EndNote packages, hence Doug's request to learn exactly what
>> your endnote software inserts that you wish to find. It is simple enough 
>> to
>> locate fields using vba, provided you know what the field construction 
>> is.
>> What exactly appears between the curly brackets {}?
>>
>> -- 
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor -  Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> ..
>>
>>
>> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
>> message
>> news:0AC0A34B-2AA9-497A-ACF9-96430D899AAE@microsoft.com...
>> > Thanks for picking this up.
>> >
>> > EndNote bibliographical software, through the EndNote add-in for Word,
>> > inserts in-text bibliographical citations in a Word document as fields.
>> >
>> > I'm not concerned at this stage with modifying any fields, Switching to 
>> > a
>> > different bibliographical style (not to be confused with Word's 
>> > formatting
>> > styles) is a procedure that EndNote takes care without any difficulty. 
>> > My
>> > problem is just with finding the fields so that I can delete the
>> > now-extraneous space (in the ordinary Word text, not the field) that in
>> > most
>> > instances exists immediately before the point where the field has been
>> > inserted. In other words I want to bring these fields up against the
>> > preceding text - where previously they were inserted with a space 
>> > between
>> > them and the preceding text.
>> >
>> > But Word doesn't let me find ANY fields using wildcards. There are also
>> > other fields in the document, like hyperlinks and a table of Contents, 
>> > and
>> > when Use Wildcards is checked ^d doesn't find them either. (Without
>> > Wildcards, ^d finds all of them.)
>> >
>> > When the field codes are displayed, all of them (the citation entries 
>> > and
>> > the hyperlinks and what have you) are enclosed in the usual curly
>> > brackets. I
>> > also tried just searching for spaces before curly brackets, but Field 
>> > Code
>> > brackets don't seem to be findable with Find and replace.
>> >
>> > Does this information help?
>> >
>> >
>> > "Doug Robbins - Word MVP" wrote:
>> >
>> >> I am not sure what you mean by EndNote citation fields.  If you use
>> >> Alt+F9
>> >> to toggle on the display of field codes in the Word document, what do 
>> >> you
>> >> see in place of the fields that you want to modify?
>> >>
>> >> -- 
>> >> Hope this helps.
>> >>
>> >> Please reply to the newsgroup unless you wish to avail yourself of my
>> >> services on a paid consulting basis.
>> >>
>> >> Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
>> >>
>> >> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in
>> >> message
>> >> news:103C0B9E-B542-4E8F-AD2B-4AFC1A831678@microsoft.com...
>> >> > In Word 2007 I'm editing a paper which contains EndNote citation
>> >> > fields,
>> >> > and
>> >> > in the course of switching the paper to a different bibliographic 
>> >> > style
>> >> > I
>> >> > need to find and replace any space that occurs before a citation. 
>> >> > Each
>> >> > citation exists in the document as a field in Word.
>> >> >
>> >> > With field codes toggled on, when I do a simple Find for ^d Word 
>> >> > finds
>> >> > each
>> >> > field with no trouble, but when I switch on "Use wildcards" and try 
>> >> > the
>> >> > syntax
>> >> > Find: ( )(^d) - and I have also tried ( )([^d])
>> >> > I get an error message saying that ^d is not supported when the
>> >> > Wildcards
>> >> > check box is selected.
>> >> >
>> >> > Can anyone help me with Find and replace syntax that will work for 
>> >> > this
>> >> > task?
>> >> >
>>
>>
>> .
>> 


0
Graham
5/19/2010 8:37:51 AM
Many thanks Graham. It works like a charm. 

This is the second macro you've provided for me in the last couple of weeks, 
and it has been an excellent learning curve studying how the VBA pans out. 
I'm very grateful to you for that.

Would I be going too far out out of line to ask if you could extend this 
piece of code to perform one further operation? 

Once the spaces to the left of a citation's insertion point have been 
removed I then want to search for any commas or full stops (only commas or 
full stops) that come immediately to the right of the insertion point (that 
would be to the right of the field's closing curly bracket), and move them to 
a new position immediately to the left of the citation. Possibly this should 
be a separate operation but I think it would be safe enough to do it all in 
one shot with a single macro.

What these two operations will in effect accomplish is to tidy up the 
puctuation for conversion of an in-text author-date citation style like APA, 
where the citation is entered inside a comma or full stop, to a citation 
style using superscript numbered citations that must follow a comma or 
full-stop (in this case a superscript version of the Vancouver style that is 
common in medical publications). A macro that does it all in one click would 
be a very handy little tool. 

The author of the paper I'm editing originally wrote it for an APA-style 
journal, then decided to switch and send it to a medical-style journal. 
EndNote will change the form of the citations for you, but it doesn't have a 
way to shift their location.
0
Utf
5/19/2010 1:14:01 PM
Let me get this right ... you want to move any comma or full stop that comes 
immediately after the closing bracket of the field to immediately before the 
opening bracket of the field. Is that correct? In that case you can create 
another range at the end of the field to encompass the following character, 
essentially repeating the process to remove the space, and add the content 
of that range (if a comma or a full stop) after the previous range, before 
deleting the the second range.

Dim oField As Field
Dim oRng As Range, oEnd As Range
For Each oField In ActiveDocument.Fields
    If InStr(1, oField.Code, "ADDIN EN.CITE") Then
        oField.Select
        Selection.Collapse wdCollapseStart
        Set oRng = Selection.Range
        oRng.MoveStart wdCharacter, -1
        If oRng.Text = " " Then
           oRng.Text = ""
        End If
        oField.Select
        Selection.Collapse wdCollapseEnd
        Set oEnd = Selection.Range
        oEnd.End = oEnd.Start + 1
        If oEnd.Text = "," Or oEnd.Text = "." Then
            oRng.InsertAfter oEnd.Text
            oEnd.Delete
        End If
    End If
Next oField


-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
> Many thanks Graham. It works like a charm.
>
> This is the second macro you've provided for me in the last couple of 
> weeks,
> and it has been an excellent learning curve studying how the VBA pans out.
> I'm very grateful to you for that.
>
> Would I be going too far out out of line to ask if you could extend this
> piece of code to perform one further operation?
>
> Once the spaces to the left of a citation's insertion point have been
> removed I then want to search for any commas or full stops (only commas or
> full stops) that come immediately to the right of the insertion point 
> (that
> would be to the right of the field's closing curly bracket), and move them 
> to
> a new position immediately to the left of the citation. Possibly this 
> should
> be a separate operation but I think it would be safe enough to do it all 
> in
> one shot with a single macro.
>
> What these two operations will in effect accomplish is to tidy up the
> puctuation for conversion of an in-text author-date citation style like 
> APA,
> where the citation is entered inside a comma or full stop, to a citation
> style using superscript numbered citations that must follow a comma or
> full-stop (in this case a superscript version of the Vancouver style that 
> is
> common in medical publications). A macro that does it all in one click 
> would
> be a very handy little tool.
>
> The author of the paper I'm editing originally wrote it for an APA-style
> journal, then decided to switch and send it to a medical-style journal.
> EndNote will change the form of the citations for you, but it doesn't have 
> a
> way to shift their location. 


0
Graham
5/19/2010 2:15:05 PM
Perfect. Does exactly what's needed. One click in EndNote converts the 
citation style, and one click on this macro now shifts all the citations 
inside the punctuation mark. Huge time saver.

Thank you very much indeed.

"Graham Mayor" wrote:

> Let me get this right ... you want to move any comma or full stop that comes 
> immediately after the closing bracket of the field to immediately before the 
> opening bracket of the field. Is that correct? In that case you can create 
> another range at the end of the field to encompass the following character, 
> essentially repeating the process to remove the space, and add the content 
> of that range (if a comma or a full stop) after the previous range, before 
> deleting the the second range.
> 
> Dim oField As Field
> Dim oRng As Range, oEnd As Range
> For Each oField In ActiveDocument.Fields
>     If InStr(1, oField.Code, "ADDIN EN.CITE") Then
>         oField.Select
>         Selection.Collapse wdCollapseStart
>         Set oRng = Selection.Range
>         oRng.MoveStart wdCharacter, -1
>         If oRng.Text = " " Then
>            oRng.Text = ""
>         End If
>         oField.Select
>         Selection.Collapse wdCollapseEnd
>         Set oEnd = Selection.Range
>         oEnd.End = oEnd.Start + 1
>         If oEnd.Text = "," Or oEnd.Text = "." Then
>             oRng.InsertAfter oEnd.Text
>             oEnd.Delete
>         End If
>     End If
> Next oField
> 
> 
> -- 
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor -  Word MVP
> 
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> 
> 
> "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
> news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
> > Many thanks Graham. It works like a charm.
> >
> > This is the second macro you've provided for me in the last couple of 
> > weeks,
> > and it has been an excellent learning curve studying how the VBA pans out.
> > I'm very grateful to you for that.
> >
> > Would I be going too far out out of line to ask if you could extend this
> > piece of code to perform one further operation?
> >
> > Once the spaces to the left of a citation's insertion point have been
> > removed I then want to search for any commas or full stops (only commas or
> > full stops) that come immediately to the right of the insertion point 
> > (that
> > would be to the right of the field's closing curly bracket), and move them 
> > to
> > a new position immediately to the left of the citation. Possibly this 
> > should
> > be a separate operation but I think it would be safe enough to do it all 
> > in
> > one shot with a single macro.
> >
> > What these two operations will in effect accomplish is to tidy up the
> > puctuation for conversion of an in-text author-date citation style like 
> > APA,
> > where the citation is entered inside a comma or full stop, to a citation
> > style using superscript numbered citations that must follow a comma or
> > full-stop (in this case a superscript version of the Vancouver style that 
> > is
> > common in medical publications). A macro that does it all in one click 
> > would
> > be a very handy little tool.
> >
> > The author of the paper I'm editing originally wrote it for an APA-style
> > journal, then decided to switch and send it to a medical-style journal.
> > EndNote will change the form of the citations for you, but it doesn't have 
> > a
> > way to shift their location. 
> 
> 
> .
> 
0
Utf
5/19/2010 3:36:02 PM
Make that "one click on this macro now shifts all the citation OUTside the 
punctuation mark." Whoops.

"David Newmarch" wrote:

> Perfect. Does exactly what's needed. One click in EndNote converts the 
> citation style, and one click on this macro now shifts all the citations 
> inside the punctuation mark. Huge time saver.
> 
> Thank you very much indeed.
> 
> "Graham Mayor" wrote:
> 
> > Let me get this right ... you want to move any comma or full stop that comes 
> > immediately after the closing bracket of the field to immediately before the 
> > opening bracket of the field. Is that correct? In that case you can create 
> > another range at the end of the field to encompass the following character, 
> > essentially repeating the process to remove the space, and add the content 
> > of that range (if a comma or a full stop) after the previous range, before 
> > deleting the the second range.
> > 
> > Dim oField As Field
> > Dim oRng As Range, oEnd As Range
> > For Each oField In ActiveDocument.Fields
> >     If InStr(1, oField.Code, "ADDIN EN.CITE") Then
> >         oField.Select
> >         Selection.Collapse wdCollapseStart
> >         Set oRng = Selection.Range
> >         oRng.MoveStart wdCharacter, -1
> >         If oRng.Text = " " Then
> >            oRng.Text = ""
> >         End If
> >         oField.Select
> >         Selection.Collapse wdCollapseEnd
> >         Set oEnd = Selection.Range
> >         oEnd.End = oEnd.Start + 1
> >         If oEnd.Text = "," Or oEnd.Text = "." Then
> >             oRng.InsertAfter oEnd.Text
> >             oEnd.Delete
> >         End If
> >     End If
> > Next oField
> > 
> > 
> > -- 
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > Graham Mayor -  Word MVP
> > 
> > My web site www.gmayor.com
> > Word MVP web site http://word.mvps.org
> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> > 
> > 
> > "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
> > news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
> > > Many thanks Graham. It works like a charm.
> > >
> > > This is the second macro you've provided for me in the last couple of 
> > > weeks,
> > > and it has been an excellent learning curve studying how the VBA pans out.
> > > I'm very grateful to you for that.
> > >
> > > Would I be going too far out out of line to ask if you could extend this
> > > piece of code to perform one further operation?
> > >
> > > Once the spaces to the left of a citation's insertion point have been
> > > removed I then want to search for any commas or full stops (only commas or
> > > full stops) that come immediately to the right of the insertion point 
> > > (that
> > > would be to the right of the field's closing curly bracket), and move them 
> > > to
> > > a new position immediately to the left of the citation. Possibly this 
> > > should
> > > be a separate operation but I think it would be safe enough to do it all 
> > > in
> > > one shot with a single macro.
> > >
> > > What these two operations will in effect accomplish is to tidy up the
> > > puctuation for conversion of an in-text author-date citation style like 
> > > APA,
> > > where the citation is entered inside a comma or full stop, to a citation
> > > style using superscript numbered citations that must follow a comma or
> > > full-stop (in this case a superscript version of the Vancouver style that 
> > > is
> > > common in medical publications). A macro that does it all in one click 
> > > would
> > > be a very handy little tool.
> > >
> > > The author of the paper I'm editing originally wrote it for an APA-style
> > > journal, then decided to switch and send it to a medical-style journal.
> > > EndNote will change the form of the citations for you, but it doesn't have 
> > > a
> > > way to shift their location. 
> > 
> > 
> > .
> > 
0
Utf
5/19/2010 4:28:01 PM
Now you've lost me?

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in message 
news:27CD8479-39DE-4157-B53E-3FFFAA4B88CF@microsoft.com...
> Make that "one click on this macro now shifts all the citation OUTside the
> punctuation mark." Whoops.
>
> "David Newmarch" wrote:
>
>> Perfect. Does exactly what's needed. One click in EndNote converts the
>> citation style, and one click on this macro now shifts all the citations
>> inside the punctuation mark. Huge time saver.
>>
>> Thank you very much indeed.
>>
>> "Graham Mayor" wrote:
>>
>> > Let me get this right ... you want to move any comma or full stop that 
>> > comes
>> > immediately after the closing bracket of the field to immediately 
>> > before the
>> > opening bracket of the field. Is that correct? In that case you can 
>> > create
>> > another range at the end of the field to encompass the following 
>> > character,
>> > essentially repeating the process to remove the space, and add the 
>> > content
>> > of that range (if a comma or a full stop) after the previous range, 
>> > before
>> > deleting the the second range.
>> >
>> > Dim oField As Field
>> > Dim oRng As Range, oEnd As Range
>> > For Each oField In ActiveDocument.Fields
>> >     If InStr(1, oField.Code, "ADDIN EN.CITE") Then
>> >         oField.Select
>> >         Selection.Collapse wdCollapseStart
>> >         Set oRng = Selection.Range
>> >         oRng.MoveStart wdCharacter, -1
>> >         If oRng.Text = " " Then
>> >            oRng.Text = ""
>> >         End If
>> >         oField.Select
>> >         Selection.Collapse wdCollapseEnd
>> >         Set oEnd = Selection.Range
>> >         oEnd.End = oEnd.Start + 1
>> >         If oEnd.Text = "," Or oEnd.Text = "." Then
>> >             oRng.InsertAfter oEnd.Text
>> >             oEnd.Delete
>> >         End If
>> >     End If
>> > Next oField
>> >
>> >
>> > -- 
>> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> > Graham Mayor -  Word MVP
>> >
>> > My web site www.gmayor.com
>> > Word MVP web site http://word.mvps.org
>> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >
>> >
>> > "David Newmarch" <DavidNewmarch@discussions.microsoft.com> wrote in 
>> > message
>> > news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
>> > > Many thanks Graham. It works like a charm.
>> > >
>> > > This is the second macro you've provided for me in the last couple of
>> > > weeks,
>> > > and it has been an excellent learning curve studying how the VBA pans 
>> > > out.
>> > > I'm very grateful to you for that.
>> > >
>> > > Would I be going too far out out of line to ask if you could extend 
>> > > this
>> > > piece of code to perform one further operation?
>> > >
>> > > Once the spaces to the left of a citation's insertion point have been
>> > > removed I then want to search for any commas or full stops (only 
>> > > commas or
>> > > full stops) that come immediately to the right of the insertion point
>> > > (that
>> > > would be to the right of the field's closing curly bracket), and move 
>> > > them
>> > > to
>> > > a new position immediately to the left of the citation. Possibly this
>> > > should
>> > > be a separate operation but I think it would be safe enough to do it 
>> > > all
>> > > in
>> > > one shot with a single macro.
>> > >
>> > > What these two operations will in effect accomplish is to tidy up the
>> > > puctuation for conversion of an in-text author-date citation style 
>> > > like
>> > > APA,
>> > > where the citation is entered inside a comma or full stop, to a 
>> > > citation
>> > > style using superscript numbered citations that must follow a comma 
>> > > or
>> > > full-stop (in this case a superscript version of the Vancouver style 
>> > > that
>> > > is
>> > > common in medical publications). A macro that does it all in one 
>> > > click
>> > > would
>> > > be a very handy little tool.
>> > >
>> > > The author of the paper I'm editing originally wrote it for an 
>> > > APA-style
>> > > journal, then decided to switch and send it to a medical-style 
>> > > journal.
>> > > EndNote will change the form of the citations for you, but it doesn't 
>> > > have
>> > > a
>> > > way to shift their location.
>> >
>> >
>> > .
>> > 


0
Graham
5/20/2010 5:01:58 AM
It's ok, he's saying the macro is doing just what he wanted. In US
style, footnote marks (etc.) appear to the right, i.e. outside, of
punctuation marks, but author-date references are considered part of
the sentence so they go to the left, i.e. inside, of punctuation
marks.

On May 20, 1:01=A0am, "Graham Mayor" <gma...@REMOVETHISmvps.org> wrote:
> Now you've lost me?
>
> "David Newmarch" <DavidNewma...@discussions.microsoft.com> wrote in messa=
ge
>
> news:27CD8479-39DE-4157-B53E-3FFFAA4B88CF@microsoft.com...
>
>
>
> > Make that "one click on this macro now shifts all the citation OUTside =
the
> > punctuation mark." Whoops.
>
> > "David Newmarch" wrote:
>
> >> Perfect. Does exactly what's needed. One click in EndNote converts the
> >> citation style, and one click on this macro now shifts all the citatio=
ns
> >> inside the punctuation mark. Huge time saver.
>
> >> Thank you very much indeed.
>
> >> "Graham Mayor" wrote:
>
> >> > Let me get this right ... you want to move any comma or full stop th=
at
> >> > comes
> >> > immediately after the closing bracket of the field to immediately
> >> > before the
> >> > opening bracket of the field. Is that correct? In that case you can
> >> > create
> >> > another range at the end of the field to encompass the following
> >> > character,
> >> > essentially repeating the process to remove the space, and add the
> >> > content
> >> > of that range (if a comma or a full stop) after the previous range,
> >> > before
> >> > deleting the the second range.
>
> >> > Dim oField As Field
> >> > Dim oRng As Range, oEnd As Range
> >> > For Each oField In ActiveDocument.Fields
> >> > =A0 =A0 If InStr(1, oField.Code, "ADDIN EN.CITE") Then
> >> > =A0 =A0 =A0 =A0 oField.Select
> >> > =A0 =A0 =A0 =A0 Selection.Collapse wdCollapseStart
> >> > =A0 =A0 =A0 =A0 Set oRng =3D Selection.Range
> >> > =A0 =A0 =A0 =A0 oRng.MoveStart wdCharacter, -1
> >> > =A0 =A0 =A0 =A0 If oRng.Text =3D " " Then
> >> > =A0 =A0 =A0 =A0 =A0 =A0oRng.Text =3D ""
> >> > =A0 =A0 =A0 =A0 End If
> >> > =A0 =A0 =A0 =A0 oField.Select
> >> > =A0 =A0 =A0 =A0 Selection.Collapse wdCollapseEnd
> >> > =A0 =A0 =A0 =A0 Set oEnd =3D Selection.Range
> >> > =A0 =A0 =A0 =A0 oEnd.End =3D oEnd.Start + 1
> >> > =A0 =A0 =A0 =A0 If oEnd.Text =3D "," Or oEnd.Text =3D "." Then
> >> > =A0 =A0 =A0 =A0 =A0 =A0 oRng.InsertAfter oEnd.Text
> >> > =A0 =A0 =A0 =A0 =A0 =A0 oEnd.Delete
> >> > =A0 =A0 =A0 =A0 End If
> >> > =A0 =A0 End If
> >> > Next oField
>
> >> > --
> >> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> > Graham Mayor - =A0Word MVP
>
> >> > My web sitewww.gmayor.com
> >> > Word MVP web sitehttp://word.mvps.org
> >> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> >> > "David Newmarch" <DavidNewma...@discussions.microsoft.com> wrote in
> >> > message
> >> >news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
> >> > > Many thanks Graham. It works like a charm.
>
> >> > > This is the second macro you've provided for me in the last couple=
 of
> >> > > weeks,
> >> > > and it has been an excellent learning curve studying how the VBA p=
ans
> >> > > out.
> >> > > I'm very grateful to you for that.
>
> >> > > Would I be going too far out out of line to ask if you could exten=
d
> >> > > this
> >> > > piece of code to perform one further operation?
>
> >> > > Once the spaces to the left of a citation's insertion point have b=
een
> >> > > removed I then want to search for any commas or full stops (only
> >> > > commas or
> >> > > full stops) that come immediately to the right of the insertion po=
int
> >> > > (that
> >> > > would be to the right of the field's closing curly bracket), and m=
ove
> >> > > them
> >> > > to
> >> > > a new position immediately to the left of the citation. Possibly t=
his
> >> > > should
> >> > > be a separate operation but I think it would be safe enough to do =
it
> >> > > all
> >> > > in
> >> > > one shot with a single macro.
>
> >> > > What these two operations will in effect accomplish is to tidy up =
the
> >> > > puctuation for conversion of an in-text author-date citation style
> >> > > like
> >> > > APA,
> >> > > where the citation is entered inside a comma or full stop, to a
> >> > > citation
> >> > > style using superscript numbered citations that must follow a comm=
a
> >> > > or
> >> > > full-stop (in this case a superscript version of the Vancouver sty=
le
> >> > > that
> >> > > is
> >> > > common in medical publications). A macro that does it all in one
> >> > > click
> >> > > would
> >> > > be a very handy little tool.
>
> >> > > The author of the paper I'm editing originally wrote it for an
> >> > > APA-style
> >> > > journal, then decided to switch and send it to a medical-style
> >> > > journal.
> >> > > EndNote will change the form of the citations for you, but it does=
n't
> >> > > have
> >> > > a
> >> > > way to shift their location.
0
Peter
5/20/2010 11:14:38 AM
OK thanks for the explanation. I was beginning to think I had boobed :)

-- 
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


"Peter T. Daniels" <grammatim@verizon.net> wrote in message 
news:1f938d87-32cb-4dc6-96a0-91ec1a31c2e5@o12g2000vba.googlegroups.com...
It's ok, he's saying the macro is doing just what he wanted. In US
style, footnote marks (etc.) appear to the right, i.e. outside, of
punctuation marks, but author-date references are considered part of
the sentence so they go to the left, i.e. inside, of punctuation
marks.

On May 20, 1:01 am, "Graham Mayor" <gma...@REMOVETHISmvps.org> wrote:
> Now you've lost me?
>
> "David Newmarch" <DavidNewma...@discussions.microsoft.com> wrote in 
> message
>
> news:27CD8479-39DE-4157-B53E-3FFFAA4B88CF@microsoft.com...
>
>
>
> > Make that "one click on this macro now shifts all the citation OUTside 
> > the
> > punctuation mark." Whoops.
>
> > "David Newmarch" wrote:
>
> >> Perfect. Does exactly what's needed. One click in EndNote converts the
> >> citation style, and one click on this macro now shifts all the 
> >> citations
> >> inside the punctuation mark. Huge time saver.
>
> >> Thank you very much indeed.
>
> >> "Graham Mayor" wrote:
>
> >> > Let me get this right ... you want to move any comma or full stop 
> >> > that
> >> > comes
> >> > immediately after the closing bracket of the field to immediately
> >> > before the
> >> > opening bracket of the field. Is that correct? In that case you can
> >> > create
> >> > another range at the end of the field to encompass the following
> >> > character,
> >> > essentially repeating the process to remove the space, and add the
> >> > content
> >> > of that range (if a comma or a full stop) after the previous range,
> >> > before
> >> > deleting the the second range.
>
> >> > Dim oField As Field
> >> > Dim oRng As Range, oEnd As Range
> >> > For Each oField In ActiveDocument.Fields
> >> > If InStr(1, oField.Code, "ADDIN EN.CITE") Then
> >> > oField.Select
> >> > Selection.Collapse wdCollapseStart
> >> > Set oRng = Selection.Range
> >> > oRng.MoveStart wdCharacter, -1
> >> > If oRng.Text = " " Then
> >> > oRng.Text = ""
> >> > End If
> >> > oField.Select
> >> > Selection.Collapse wdCollapseEnd
> >> > Set oEnd = Selection.Range
> >> > oEnd.End = oEnd.Start + 1
> >> > If oEnd.Text = "," Or oEnd.Text = "." Then
> >> > oRng.InsertAfter oEnd.Text
> >> > oEnd.Delete
> >> > End If
> >> > End If
> >> > Next oField
>
> >> > --
> >> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> > Graham Mayor - Word MVP
>
> >> > My web sitewww.gmayor.com
> >> > Word MVP web sitehttp://word.mvps.org
> >> > <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
> >> > "David Newmarch" <DavidNewma...@discussions.microsoft.com> wrote in
> >> > message
> >> >news:7534F4BD-3822-4548-9D46-087B61247B28@microsoft.com...
> >> > > Many thanks Graham. It works like a charm.
>
> >> > > This is the second macro you've provided for me in the last couple 
> >> > > of
> >> > > weeks,
> >> > > and it has been an excellent learning curve studying how the VBA 
> >> > > pans
> >> > > out.
> >> > > I'm very grateful to you for that.
>
> >> > > Would I be going too far out out of line to ask if you could extend
> >> > > this
> >> > > piece of code to perform one further operation?
>
> >> > > Once the spaces to the left of a citation's insertion point have 
> >> > > been
> >> > > removed I then want to search for any commas or full stops (only
> >> > > commas or
> >> > > full stops) that come immediately to the right of the insertion 
> >> > > point
> >> > > (that
> >> > > would be to the right of the field's closing curly bracket), and 
> >> > > move
> >> > > them
> >> > > to
> >> > > a new position immediately to the left of the citation. Possibly 
> >> > > this
> >> > > should
> >> > > be a separate operation but I think it would be safe enough to do 
> >> > > it
> >> > > all
> >> > > in
> >> > > one shot with a single macro.
>
> >> > > What these two operations will in effect accomplish is to tidy up 
> >> > > the
> >> > > puctuation for conversion of an in-text author-date citation style
> >> > > like
> >> > > APA,
> >> > > where the citation is entered inside a comma or full stop, to a
> >> > > citation
> >> > > style using superscript numbered citations that must follow a comma
> >> > > or
> >> > > full-stop (in this case a superscript version of the Vancouver 
> >> > > style
> >> > > that
> >> > > is
> >> > > common in medical publications). A macro that does it all in one
> >> > > click
> >> > > would
> >> > > be a very handy little tool.
>
> >> > > The author of the paper I'm editing originally wrote it for an
> >> > > APA-style
> >> > > journal, then decided to switch and send it to a medical-style
> >> > > journal.
> >> > > EndNote will change the form of the citations for you, but it 
> >> > > doesn't
> >> > > have
> >> > > a
> >> > > way to shift their location. 


0
Graham
5/20/2010 11:31:32 AM
Reply:

Similar Artilces:

Message From Field in Folder
When viewing the list of my new messages, is there a way to see the email address of the sender instead of the alias before I open it? In the From column I see "John". When I open the email I see "John <john@johnsemail.com>". I want to see the "john@johnsemail.com" before I open it so I can tell the difference between emails from "Microsoft Support <yourfu@edifyouopenedthis.com>" and "Microsoft Support <someguywhosreally@microsoft.com>" I am currently using outlook 2002 and 2003 alternately based on my mood. Mike If you ...

modify fields
Hi - just started using CRM and have several questions. 1. How do I modify the COUNTRY field? I want a user to be able to type in the name of the country and return and display the 2-letter country abbreviation? Do I have to build a new table for that or can I modify the country field as it is now? 2. How do I apply or change field rules such as case- convert, etc. for either existing fields or fields I create? Thanks in advance for any assistance you can give me. Cheers Ruthie I think the existing country field is a simple text field. You cannot out any logic behind these fields. One op...

Stopping autoformat when replacing cells.
I'm trying to replace text cells that read 1-1, 1-2, 1-3, etc. to be 2-1, 2-2, 2-3, etc. I've been going to Find and finding "1-" and replacing with "2-", which changes the 1-1, for example to 38749. What am I doing wrong? Hi Excel is treating 1-1 etc as a date - and hence it comes up with 38749 (which is 1st Feb). I would suggest either formatting the cells to Text before you start or prefixing your entries with ' Andy. "Jaelou" <Jaelou@discussions.microsoft.com> wrote in message news:FBB6D3EA-9DD4-4255-9D21-D760A4D50CBE@microsoft.co...

Finding Next Empty Cell in a Range
My worksheet is set-up for 12 month price tracking. The entry range is 12 rows (months) by 31 columns (days). How can I write a macro that will locate the cursor to the next empty cell in the range? What I am looking for is an efficient "find" command. I would prefer to execute by ctl-(letter) if possible. Thanks for helping. Need more information - what last/empty cell are you looking for? Next empty one in a row or column? Do we need to consider what the current month or day is? While we're figuring that out, here's code with 3 separate 'sea...

Quote for Customer can't find data source #3
I need assistance finding the data source for the quote mail merge in CRM 4.0. I get a error "mail_merge_64494[1].doc is a mail merge document. Word cannot open the data source, ." Here is the process I go through before I get the error: - I open a quote - click on menu bar button "Print Quote for Customer" - select organization mail merge, Quote for customer, and OK - when asked if I want to open or save, I select open - I pick yes, when it asks if it can put data on my document I then get message above. How do I find the datasource? Also is there a way to configure...

enter value based on drop down list of another field?
I have an excel 2003 spreadsheet with 3 worksheets. In sheet 1, I created a drop down list in column A based on values in sheet 3, column A (item number). Thisd data comes from sheet 3, where I have column A (Item #'s), column B (Item desc)an Column C (price) In column B of sheet 1, I have Item Descriptions and in column C I have price. I want this to automatically fill in based on what I enter in the column A sheet 1 and it should get the corresponding values from sheet 3 column B and C. I can make the drop down list in sheet 1 column B and C, but some of the descriptions need ...

Restrickting from field
Hi, When you create new email, you can click option and tick FROM field. It will be add FROM field and you can use address book to pick up any name. Are their any options or policy to restrict this function? Thanks Using Exchange server? This should not be possible by default - someone has changed the permissions. What version of Exchange? Follow the KB 262054 to see where permissions might be set - and remove groups that shouldn't be there. wschoi wrote: > Hi, > > When you create new email, you can click option and tick > FROM field. > > It will be add FROM f...

"Find a contact box" problem
Hi. I�m having problems with the �Find a contact� box on the Standard toolbar. Previously, I would type in a name and the search would pull up name/s from the Outlook Contacts folder first then, if the name is not in the Contacts folder, it would pull up name/s from the Global Address List if any. Now, when I type in a name, the search only pulls up name/s from the Global Address List. The search does not include the Contacts folder although there are entries in the Contacts folder. The problem started after I transferred a couple of Contacts subfolders to another pst file. How do I fix the p...

Automatic Data Entry Script OnChange Event for Date Field.
Hi, Sub: Automatic Data Entry Script OnChange Event for Date Field. has anyone assigned 'Today date'( new Date()) to a custom date filed on the form - OnChange of a Picklist field, I have the following code. DatefiledName.value = new Date(); This assigns, currect date to the field, but then when I save it does not like it. When I manually assign a date it displays in the format mm/dd/yyyy, and saves correctly, so I changed the script to: d= new Date(); s = d.(getMonth() +1); s += '/' + d.getDate(); s += '/' + d.getFullYear(); DatefiledName.value = s; This also acc...

Data missing from enterprise custom task fields after migrating
We can see the enterprise task fields, but none of the data is displayed in files migrated from Project Server 2003 to 2007. Any ideas? -- michael Michael: What process did you follow for migration? -- Gary L. Chefetz, MVP, MCT, MCTIP Business: http://www.msprojectexperts.com FAQs: http://www.projectserverexperts.com BLOG: http://www.projectserverhelp.com "michaelj" <notreallyme.com> wrote in message news:4BD612D9-D1AD-4FF8-B103-699AB1B54D06@microsoft.com... > We can see the enterprise task fields, but none of the data is displayed > in > fil...

finding all addresses in an exchange system
Being relatively new to Exchange and Outlook, I'm looking for the best way to implement a situation where there is a generic email account that the outside world sends to that a number of people need to monitor. Right now what I have done is set up an email enabled Public Folder and simply give permissions to that folder to the appropriate people. I also hide that address so it doesn't display in the GAL, since there is no reason for internal folks to write to that address. However, one problem I see with this scenario is I can't find an effective way to look at all email addres...

Customized picklist fields are not showing up in the preview
hi, can you please help me out in the following situation: i have customized my crm 1.2 system in a huge manner. now all customized picklists do not show up in the preview of e.g. opportunity. opening such a related opportunity offers me the possibility to change the picklist field as wanted. note: all built-in picklist fields are showing up in the preview... tia -- Fritz Theiss Did you publish the customizations? And performed an IISReset? After those actions your changes should be visible. Hope this helps, -- Ronald Lemmen Avanade Netherlands "Fritz" wrote: > hi,...

Removing the : in the coment field
When I insert a comment to a field a colon appears. I know this is meant for the user name to appear but I don't want that. In fact, I don't want the colon to appear. Currently I manually delete it from each comment I insert...is there a way to turn that feature off so I merely type in text without having that colon appear?...I am using Excel 2000 Thanks! Kathy You can use programming to insert comments with no user name. There is sample code here: http://www.contextures.com/xlcomments03.html Kathy wrote: > When I insert a comment to a field a colon appears. I know...

How to find Scribble Tutorial
Hello, I've just installed Visual Studio 2005 and would like to go through the scribble tutorial. Can someone direct me to the scribble tutorial help topic(s). I searched for scribble, tutorial, etc. I can find the sample code but not the tutorial help. Thanks in advance. >Hello, I've just installed Visual Studio 2005 and would like to go >through the scribble tutorial. Can someone direct me to the scribble >tutorial help topic(s). I searched for scribble, tutorial, etc. I can >find the sample code but not the tutorial help. Thanks in advance. http://msdn.microso...

Nested MID and FIND
Hello all! Does anyone know how I may be able to search a string and extract text from it using the MID and FIND function with multiple FINDS? I have a spreadsheet for which I have a lengthy bit of text for which I have set up to currently extract ",IE". I need to adapt the formula =MID(Dump!A1,FIND(",IE.",Dump!A1)-2,5) to also search for either ",MA" or a ",MC". These characters will always be unique and there will not be a combination of either in the text string. The string will have either one of the three but not two or all of t...

Extracting a word from a long text field
I have a text field (up to 200 characters) and I need to extract a specific word. The text field name is "MEDICATIONS" and the word I need to extract which might appear anywhere in the field is 'VENOFER'. The word need to be entered in a separate field in a query. Could any one help as to how to enter the code in the query? Thanking you Leo In the criteria I entered Like "VENOFER" Or "Venofer" It seems to work. Will it cause any problems down the line? In other wrods is this an acceptable procedure? "Leo" wrote: >...

Calculating Date Fields
I have a document that is filled with FormFields and users go from field to field filling the fields for a final document. I have been reading up on 'calculated dates' but have not seen a scenario like this. Three of my formfields are "Date1", "Date2" and "Date180." What I am trying to figure out is how to evaluate/compare Date1 and Date2 to see which is the earliest and then provide in Date180 the date 180 days from the earliest date. (Unless the form is blank there will always be a Date1, but there may not be a Date2 and if Date2 exist...

Editing Password protected form fields in Word 2007
We have created a Word document with a legacy text form field. We inserted a word date field and protected the document allowing Filling in Forms. After protecting the document when we try going to the form field and clicking on back space to delete the entry we get "This is not a valid selection" message box. We have existing word documents in 2003 with similar form fields. We were able to delete the entries and add new data. After converting the documents to 2007 or create new documents in 2007 and try to delete the entries we get the above error. Hi Veera, ...

Re: Find and Replace command
Folks, I am wondering if anyone can help me with the following scenario: I downloaded some financial info. from SAP into excel. The negative numbers are showing up as: 585,656.25- I want Excel to replace the ending (-) with a begining (- ). i.e.-585,656.25 I thought that I could type in wildcard characters to replace all the numbers with the ending (-). So: Replace .**- with -**.** While Excel is able to locate the numbers it is just changing it to exact wildcards (e.g. -**.**) I know that I am doing smething wrong..can somebody please help? Thank you. Shans A macro to do all cells...

Problems with "find" function
I sort alot of email and use "find" alot. A few days ago it just stopped working i.e. when I do a find it just scans and scans and produces nothing. This just started. Any thoughts? Thanks Bill ...

IIF Query for Numeric Values in Text Field
I’m attempting to flag interest rate spread errors and omissions in a file from a sales database using IIF statements I adapted from another database (I’m a novice at this). The field I’m querying is text format and contains both alpha and numeric values. When I test for a null value the IIF works fine, but when I test for a numeric value I get an #ERROR. Spread Error1: IIf(([Tbl 1 Eligible Closed Deposit Opps Appended]!Spread Is Null),1,0) Spread Error2: IIf(([CCC Fall 2007 Eligible Products]![IB/NIB]="NIB" And [Tbl 1 Eligible Closed Deposit Opps Appended]!Spread<4),1,0...

Enabling the "From" field in OWA
I've set up a mail-enabled public folder so a customer service group can receive e-mail and respond to it. Most of them have Outlook 2003 and they work just fine. A few of them are using OWA only (2000 right now, 2003 soon) and I can't figure out how to get the "From" box to show so they can "Send As" the folder? Is there a way to do this in OWA2000? Is there a way to do this in OWA2003? Thanks for any help! --Colin See http://www.ivasoft.biz/choosefromOWA.shtml "Colin" <IDoNotWantToBeSpammed@foo.bar> wrote in message news:epQDe.5434...

Replacing Formulas
I am redoing a spreadsheet with several pages. In each page the cells refer to a sheet that contains a master list of items. THus in the cells it shows the item but really is a formula for the item to be retrieved from the master list. I would like to delete the master list. My question is: How do I get the items on each sheet to not become blank when I do so? Do I have to retype the items or is there some way of eliminating the formula and replacing it with the item name? I hope I have made myself clear. Thanks for any help. Bob Bob, select the cells, then Edit > Copy > Edit &...

copying fields in backend
Hi Access Group. Can somebody help me with my problem. Scenarium: I have an Access backend, only with tables ;-). These tables are updated with data written from a program which is not developed in Access. I have no forms in the backend in which I can call dules or Subcodes. What I need is that when the table "tbl_prod" has been updated with new data, then the text value of field "tbl_prod.Article" is to be copied into the emty field "tbl_prod.Barcode" of the updated record. Is it possible to made this copy only in the table field setting, or can it be done ...

Look up in "Send To" field...
How do you enable the "Send To" field to do automatic lookup in your contacts? One of our employees says his home version of Outlook (outlook 2000) will not display the selection box when you enter a name that has mutliple contacts. I can;t be bothered looking into this non-work related issue because it works fine here. Thanks, brad ...