copy part of doc, then paste elsewhere with a begin/end marker?

D

David Thielen

Hi;

This is all using the WordOpenXML property. What I want to do is the
following:
1) set a range.
2) copy that part of the document.
3) set an insertion point
4) Insert the copied doc part.

All of the above I can do. What I want to ad is...

On the insert I have some kind of docx node at the beginning & end of
what was inserted so I can find the inserted part again. This should
be doable because by definition the part selected/copied is a complete
document so I all nodes should be balanced.

Maybe making the whole thing a bookmark?

And I would like for the markers to be invisible to the user editing
the document. It's fine if they can make them display, but normally it
would be hidden.

??? - thanks - dave

david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Colbert Zhou [MSFT]

Hello Dave,

We can create a hidden bookmark by specifying its name with "_" prefix.

Trying the following codes,
ActiveDocument.Bookmarks.Add("_HiddenBookmark1")
we will see there is a bookmark with name "_HiddenBookmark1" added, but the
end user cannot see it by default. End user has to click the Hidden bookmarks
option to show it out.

Let me know if you have further questions or concerns on it, and I will
follow up it.

Best regards,
Ji Zhou - MSFT
Microsoft Online Community Support
 
D

David Thielen

I am trying this for Word. Any suggestions for Excel and/or PPT?

thanks - dave


Hello Dave,

We can create a hidden bookmark by specifying its name with "_" prefix.

Trying the following codes,
ActiveDocument.Bookmarks.Add("_HiddenBookmark1")
we will see there is a bookmark with name "_HiddenBookmark1" added, but the
end user cannot see it by default. End user has to click the Hidden bookmarks
option to show it out.

Let me know if you have further questions or concerns on it, and I will
follow up it.

Best regards,
Ji Zhou - MSFT
Microsoft Online Community Support


david@[email protected]
Windward Reports -- http://www.WindwardReports.com
me -- http://dave.thielen.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 

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