Append range to document

  • Thread starter Merijn Vandenabeele
  • Start date
M

Merijn Vandenabeele

Hi,

I want to append the content of a range to a document, including all
formatting. The problem is I can't use the clipboard for this. Can this be
done and how?

Merijn
 
J

Jonathan West

Merijn Vandenabeele said:
Hi,

I want to append the content of a range to a document, including all
formatting. The problem is I can't use the clipboard for this. Can this be
done and how?

Merijn

Hi Merijn,

Yes, look up the FormattedText property in the VBA Help. There are code
samples there for what you need to do.


--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition www.classicvb.org
 
T

Tony Jollans

It ought to be _possible_ but it wouldn't be easy - I think you would need
to check for all possible formats and apply them individually to the pasted
range. Why can't you use the clipboard?

What might be possible (depending on exactly what your situation is) with
Word 2000 (though AFAIK not with later versions as the Task Pane seems off
limits to normal VBA) would be some manipulation of the Office clipboard as
a temporary holding area for what's on the Windows clipboard.
 
M

Merijn Vandenabeele

Thanks Jonathan and Tony,

seems like FormattedText was the way to go.

Best regards,
Merijn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top