Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2022, 06:14 AM
zhanglei1371 zhanglei1371 is offline How to put the shape into a canvas with xml-Method? Windows 7 64bit How to put the shape into a canvas with xml-Method? Office 2016
Novice
How to put the shape into a canvas with xml-Method?
 
Join Date: Dec 2022
Posts: 2
zhanglei1371 is on a distinguished road
Default How to put the shape into a canvas with xml-Method?

Hello Everyone!

Now I meet a puzzle about how to put some shape into a canvas.

Normally,we Can use VBA to cut selection shaperange into clipboard ,then insert a canvas into the word,and use the select method to activate the canvas to paste the shapes into the canvas.

But this method is very clumsy and not stable.

I have seen an word-addin,it can put all the shape into a canvas automatically.Especially very awesome for the flow chart。



I had study the xml-code with Activedocument.range.xml for a long time,but gained nothing。I had tried to put the pict-segment into the canvas-code,but faile in the end.

So I want to know how to achive this by the xml-method though VBA.But not Aspose or SpireDoc.Because the latter can not deal with this condition when word is open.

Thanks a lot for the help!!!
Reply With Quote
  #2  
Old 12-10-2022, 06:10 PM
Guessed's Avatar
Guessed Guessed is offline How to put the shape into a canvas with xml-Method? Windows 10 How to put the shape into a canvas with xml-Method? 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

There is an option that automatically creates the Drawing Canvas. You can turn it on vba with
Code:
Application.Options.AutoCreateNewDrawings = True
Using the interface you go to File > Options > Advanced > Editing Options > Automatically create drawing canvas when inserting AutoShapes
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 12-11-2022, 07:50 AM
zhanglei1371 zhanglei1371 is offline How to put the shape into a canvas with xml-Method? Windows 7 64bit How to put the shape into a canvas with xml-Method? Office 2016
Novice
How to put the shape into a canvas with xml-Method?
 
Join Date: Dec 2022
Posts: 2
zhanglei1371 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
There is an option that automatically creates the Drawing Canvas. You can turn it on vba with
Code:
Application.Options.AutoCreateNewDrawings = True
Using the interface you go to File > Options > Advanced > Editing Options > Automatically create drawing canvas when inserting AutoShapes
THX for the reply,but I have to deal with a lot of documents with many shapes without canvas. So I want to know how to solve this condition with Vba-xml.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to put the shape into a canvas with xml-Method? Changing Recorded Macro Selection/Clipboard Method to Range/FormattedText Method zanodor Word VBA 5 07-15-2022 01:25 AM
Using the Drawing Canvas RobertWA Word 5 08-31-2020 02:34 PM
How to put the shape into a canvas with xml-Method? How do i remove the border around a text box in my drawing canvas? laredotornado Word 1 02-23-2017 11:11 AM
Saving drawing canvas as vector graphic ChrisBrewster Word 1 11-17-2014 11:41 AM
Pasting screendumped pictures into a drawing canvas simian Drawing and Graphics 0 10-06-2008 06:01 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:27 AM.


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