Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-04-2018, 07:06 AM
BLUEPUPIL BLUEPUPIL is offline Macro-inserting text box Windows 7 64bit Macro-inserting text box Office 2016
Novice
Macro-inserting text box
 
Join Date: Feb 2016
Posts: 20
BLUEPUPIL is on a distinguished road
Default

The long story short: I'm making attempt to migrate from WordPerfect to MS Word.
In WP I use macros. Because macro recorder in Word don't record properly mouse movements and clicks, I've got some difficulties, for I am not familiar with VBA.

For great part of my macros, I've found a bypass- using Styles and assigning shortcut keys. However, I was unable to include in Styles possibilities to highlight text and to insert text boxes. Highlighting text was relatively easy to achieve using macro recorder.

And remains one final hurdle- to create a macro which inserts text box with specific text- hence this thread and the need for YOUR HELP.

I've made a screen picture to visualize the text box. It's positioned between two horizontal lines and wrap is set to- *in front of text*. The ideal behavior of the macro will be as follows:
after putting the blinking cursor somewhere between letters in a word or select a word- execution of the macro will place the text box just above the word in the space between two horizontal lines.

I'm assuming that such macro is impossible (I may be wrong), because each time the insertion horizontal point is altered and floats according to the cursor position (vertical position keeps the same value - exact vertical position between two horizontal lines) and came up with compromise- according to macro layout it's possible to determine the vertical position of the text box as *Absolute* and *0.42" below Line* and horizontal as *Relative* and *35% relative to Page*.

These figures are taken from # More Layout Options> Layout> Position # of the text box from the picture. I'm bringing here the complete characteristics of the text box, hoping that YOU will help me to organize them in VBA script.

==============
1.Insert a text box between two horizontal lines- The exact position is predetermined or if possible is floating horizontally
relative to the cursor position.
2.Text box layout options.
2.1.Position- horizontal- *Relative position- 35% relative to Page*; vertical- *Absolute position- 0.42" below Line*; Options- Move object with text- yes; Allow overlap- yes.
2.2.Text Wrapping- *In front of text*;
2.3.Size- Height- *Absolute-1"* Width- *Absolute-3"* Rotate- *Rotation-0* Scale- Height-100%; Width-100%.
3.Format shape.
3.1.Fill- No fill;
3.2.Line- No line;
4.Font in the text box
4.1.Font- *CollegiateInsideFL*;
4.2.Font size- 30;
4.3.Font color-
There are three colors.
Each one of the three figures has separate color:
First one (10.)-R,G,B= 250,100,0;
Second(20.)-R,G,B= 0,176,240;
Third(30.)-R,G,B= 146,208,80;
4.4.Text effects- Text Outline- *Solid line*- Color-R,G,B= 0,0,0; Transparency- 0%; Width- 1.5pt.
=======================

Last edited by Charles Kenyon; 04-04-2018 at 08:52 AM. Reason: Add paragraph breaks to make more readable.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro-inserting text box Macro for inserting and formatting headers and footers Mike_Lennox Word VBA 4 10-06-2016 12:10 AM
Macro-inserting text box Need Macro for Find and Replace, Inserting logo in Ms-Word. Aswinraj Word VBA 1 06-05-2016 04:33 PM
Macro-inserting text box Inserting and rearranging text by inspecting existing text rok123 Word VBA 9 02-05-2016 07:31 PM
Macro for Inserting Cross-referenced Continuation Headings rdross51 Word VBA 0 01-06-2016 10:20 PM
Macro-inserting text box Inserting key strokes with a macro line ACA Word VBA 4 12-03-2012 04:40 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft