Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 11-30-2023, 08:16 PM
Guessed's Avatar
Guessed Guessed is offline Move full stops to other end of a citation Windows 10 Move full stops to other end of a citation Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default


deepapme
The code from #14 on this thread works on my machine. You could post a sample document that the code doesn't work on if you want a quick answer otherwise we can go through a series of steps to find out what you actually have in your document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #17  
Old 12-01-2023, 05:43 PM
deepapme@gmail.com deepapme@gmail.com is offline Move full stops to other end of a citation Windows 11 Move full stops to other end of a citation Office 2021
Novice
 
Join Date: Nov 2023
Posts: 3
deepapme@gmail.com is on a distinguished road
Arrow

This is the sample file. Thanks
Attached Files
File Type: docx citation change.docx (182.6 KB, 1 views)
Reply With Quote
  #18  
Old 12-01-2023, 06:09 PM
Guessed's Avatar
Guessed Guessed is offline Move full stops to other end of a citation Windows 10 Move full stops to other end of a citation Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

That document is showing citations put in by a third party tool called Mendeley. This doesn't appear to use the built-in Microsoft citations feature and that is why the macro has no effect in that particular file.

So before developing an all-new solution for your problem, you should first determine whether the tool that created those 'citations' has a capability to perform the change that you require. If it doesn't then a completely different macro would need to work through the content controls that Mendeley has put there. This macro appears to work on your sample
Code:
Sub MoveMendeleyCitations()
  Dim aCC As ContentControl, aRng As Range
  For Each aCC In ActiveDocument.ContentControls
    If aCC.Tag Like "MENDELEY_CITATION*" Then
      Set aRng = aCC.Range
      aRng.Start = aRng.Start - 2
      aRng.End = aRng.End + 1
      Do While aRng.Characters.First = " "
        aRng.Start = aRng.Start - 1
      Loop
      aRng.Select
      If aRng.Characters.First Like "[?!:;.]" Then
        aRng.InsertAfter aRng.Characters.First
        aRng.Characters.First.Delete
        If aRng.Characters.First <> " " Then aRng.InsertBefore " "
      End If
    End If
  Next aCC
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #19  
Old 12-01-2023, 09:15 PM
deepapme@gmail.com deepapme@gmail.com is offline Move full stops to other end of a citation Windows 11 Move full stops to other end of a citation Office 2021
Novice
 
Join Date: Nov 2023
Posts: 3
deepapme@gmail.com is on a distinguished road
Smile

Thanks a lot. That works like a magic. I am grateful to you!!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Move full stops to other end of a citation Word 2014: WPerfect 6.x full-justification "stops working" dan_1 Word 12 01-24-2017 12:43 PM
Move full stops to other end of a citation Insert Citation truepharaoh Word 3 12-03-2016 01:35 AM
Move full stops to other end of a citation How to display the full citation in footnotes/endnotes chakyt22 Word 1 09-29-2015 03:37 AM
Move full stops to other end of a citation Why are full stops appearing in between every word I type?? richards_jacqui@sky.com Outlook 1 04-01-2015 10:40 PM
Move full stops to other end of a citation Citation within a Caption Wes Word 1 05-29-2012 10:29 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:12 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft