• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Microsoft Word Copy & Paste Macro

 
Ranch Hand
Posts: 71
3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a microsoft word document. In my document, some paragraphs contain the string <@@>. I want to write a macro that will search my document for the string <@@>. When it finds a paragraph which contains this string, it should copy the paragraph and then paste as hyperlink at the top of the document. It should repeat this process until it cannot find the string <@@>.

I tried this code but I keep getting the error message

Run-time error '4605'
This method or property is not available because the Clipboard is empty or not valid.




The problem is this line



I don't get any error message when I replace it with this line, but I don't want an ordinary paste; I want to paste as hyperlink




What am I doing wrong?
 
bacon. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic