Link to home
Start Free TrialLog in
Avatar of navamnk
navamnk

asked on

How to: create a textbox inside the Word document....?

hi..

By using Macros

i.  how can i place a textbox in the current cursor position. b'cause when creating a textbox (using ActiveDocument.Shapes.AddTextbox method), i don't know the exact position of the left, top, width, height parameters in the AddTextbox method and these parameters dynamically varies. so that how can i get the cursor position.

ii. how can i place an image inside the textbox

iii. is there any option to hide/show the textbox in the word document

thnks in advance
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

1) Not sure.  I've always worked with predfined text boxes but then used the left, top, etc. paramaters to fix their position within the code.

ii)

ActiveDocument.Shapes("TextBox1").Select
Selection.InlineShapes.AddPicture FileName:=file$, LinkToFile:=False, SaveWithDocument:=True

iii)

ActiveDocument.Shapes(i).Height = 0 (having recorded the height paramater to set it back later if you need...)

You can also use the Zorder property to "hide" multiple images behind each other.



Steve

ASKER CERTIFIED SOLUTION
Avatar of MacroWizard
MacroWizard

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This question has been classified as abandoned.  I will make a recommendation to the moderators on its resolution in the next round.  I would appreciate any comments by the experts that would help me in making a recommendation.


It is assumed that any participant not responding to this request is no longer interested in its final deposition.

If the asker does not know how to close the question, the options are here:
https://www.experts-exchange.com/help/closing.jsp

PLEASE DO NOT ACCEPT THIS COMMENT AS ANSWER

HAGD:O)Bruintje
EE Cleanup Volunteer