Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2021, 09:44 PM
SamDsouza SamDsouza is offline To get Returned List Values of Objects Windows 10 To get Returned List Values of Objects Office 2013
Advanced Beginner
To get Returned List Values of Objects
 
Join Date: Aug 2019
Posts: 71
SamDsouza is on a distinguished road
Default

Quote:
You can't do that in advance, since you don't know beforehand, what Style names, fonts etc. are in use and how long their names are. Moreover, if the output is generated using proportional fonts, there is never a 1:1 relationship between the character counts and their widths. If you use tabs for the separators, none of this will be a problem; you can simply adjust the tab-stops to suit once the output is generated. Better still, if you convert the output to a table, Word will handle the alignments automatically for you.
Paul. Your point well taken
In this case the output is standard with different style, font names and size etc
I was thinking on
Total how may Styles are there in the Word
Which Style (name) has maximum length. So let us keep the Len of the Style (name) which has maximum characters or letters. Same case for Font name, Alignment etc

On Beforehand
Knowing the LEN of Style(name) , LEN(Font.name), LEN(Alignment) which has max characters, keep that as Const and derive function for equal spacing between values of returned objects.

Putting exact logic for a function is really difficult for me.

Do we have vbTabstop like PRINT TAB(30); in VBA ?


For each document no will know beforehand what style font name etc have been used.
once running the macro shall give the details
Therfore i used Textbox to get the details of Returned value of objects.
This is for neat representation ie why exact spacing required
SamD
Reply With Quote
  #2  
Old 02-06-2021, 02:25 PM
macropod's Avatar
macropod macropod is offline To get Returned List Values of Objects Windows 10 To get Returned List Values of Objects Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by SamDsouza View Post
In this case the output is standard with different style, font names and size etc
I was thinking on
Total how may Styles are there in the Word
Which Style (name) has maximum length. So let us keep the Len of the Style (name) which has maximum characters or letters. Same case for Font name, Alignment etc
You could certainly do something like that, but but that would add a lot of processing for very little gain. Using tab separators and converting the output to a table (and back again if you don't want a table for the final output), would be far simpler and quicker.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-06-2021, 08:49 PM
SamDsouza SamDsouza is offline To get Returned List Values of Objects Windows 10 To get Returned List Values of Objects Office 2013
Advanced Beginner
To get Returned List Values of Objects
 
Join Date: Aug 2019
Posts: 71
SamDsouza is on a distinguished road
Default

Quote:
You could certainly do something like that, but but that would add a lot of processing for very little gain.
Was really intrested in deriving with function procedure so that everything remains neat for the representation

Quote:
Using tab separators and converting the output to a table (and back again if you don't want a table for the final output), would be far simpler and quicker.
This is something new for me
Output shall remain in textbox itself.

Will it be possible to show the two methods ?

SamD
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple found values from five sheets, multiple returned values in sheet six? irisha Excel Programming 26 09-30-2016 01:20 AM
To get Returned List Values of Objects Macros to move objects prevents moving same objects with arrow keys BruceM Word VBA 1 03-10-2015 08:20 AM
List of Objects for CreateObject excelledsoftware Excel Programming 4 09-14-2014 08:47 PM
To get Returned List Values of Objects Query list of objects and properties in VBA bshawnr Word VBA 1 08-22-2013 11:03 PM
Pivot Table:delete zero values when using calculated objects Serge 007 Excel 1 06-05-2013 11:47 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:03 AM.


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