How do I change font size based on page count? - css

First of all, I'm so sorry. I'm new to all of this and trying to learn all I can. I appreciate your time and help!
I have a mail merge Word doc and I print many records at a time. The content changes depending on the field values and it can cause a page to run to 2 pages. I need to keep them at 1.
Using a Macro, how do I set the doc to change to size 11.5 if the page runs over to 2 pages and then change back to size 12 on the next record? I want to keep the other formatting (ie: bold, italic, underlining) but just change the font size.
Thank you very much!
I know there's an option on Word to "Shrink to One Page" but I'd have to manually click that for any page that runs over. If I'm printing 25+ records at once, I couldn't do that.
I've searched for macros from others but their either for text boxes or confined areas. I don't know enough coding to alter them enough to work for me.

ActiveDocument.Range.Information(wdActiveEndPageNumber) gives you the page number, while ActiveDocument.Content.Font.Size sets the font size. So it should be as simple as:
Sub MyFunction()
If ActiveDocument.Range.Information(wdActiveEndPageNumber) > 1 Then
ActiveDocument.Content.Font.Size = 11.5
Else
ActiveDocument.Content.Font.Size = 12
End If
End Sub

Related

RDLC Local Reports KeepTogether does not work

I’m having problems with an rdlc local report. When exporting to Excel, I want to keep a table on one page, and if it doesn’t have enough space to entirely move it to the next page.
I have tried the KeepTogether property, but it doesn’t work. I have also tried other suggestions like putting the table inside a list or a rectangle, nothing helps.
Forcing page breaks dynamically is not easy, and in this case the Excel report contains 2 sheets, which is not what we want.
Does anyone have any idea how to solve this? It is a Windows Form project.

Anything below top half of page displays in black & white on print preview in browser

I'm working on an old site and when trying to print reports the css styling doesn't appear on anything below the first half of the page.
There are two tables per report and it might have something to do with this, as the first table displays colour when in print preview whereas the second table does not.
The site utilises VB and ASPX, and I believe the site was originally created use Microsoft Word, so this might be important.

Arrange fields in a view

Now after searching for 2 weeks afther a module to work on drupal 7.x version whatever, I took another way/module/guide/tutorial and yes finally i got somehow what i want without a error occures.
But now i want to make something very simple but i don't see it.
I have the module view and panel. And i want to list 3 fields in the next way:
**so you need 10 reputation for images, i'll try it to explain it like this:
|=
(where "|" is the thumbnail and "-" are the title and the other "-" is the date.
Now it shows like this:
title
date
thumbnail
I see alot on the internet about , display suite, panels, view with rewrite output, ...
But this must be soooo simple and that is getting me crazy. If i know how i just could write it myself in php/html whatever i would do it.
But i can't see the forest for the trees
Please give me something to work with or a link of a tutorial whatever. I need a right direction for this.
Yes my english is bad and i hate drupal, but still , i think drupal can be great, but it is not for me.
You are talking about "theming" which is how your fields are displayed on the screen. By default Views emits some HTML that wraps them in elements like . The exact HTML depends on which type of display you are using.
The quickest way to achieve the layout you describe is not really about Views at all, but using CSS. Make the thumbnail float:left and ensure the other two are displayed inline (without line break).

How to create a View with multiple displays with different formats (e.g. HTML List, Draggable Table) in Drupal 7

I am trying to create a View with two page displays, one that uses HTML List and another that uses Draggable Table, per the instructions for using the DraggableViews module (http://drupal.org/node/283498). However, whenever I change the format for one of the displays, it also changes for the other. Is it possible? The DraggableViews documentation (and Issues for DraggableViews) imply that it is.
Also, I know that an almost identical question was asked last year for Drupal 6 Drupal: Views, can the displays have different styles for the view? , but no satisfactory answer was given.
So, you have 2 displays. Do this:
1. For the first Display, click on Format.
2. In the Top : 'For' -> choose 'This page' ('This x' where x is what you display)
3. For the second Display do the same.
Basically, for all items in a view, you can choose if it applies for all display or for the current one.
Hope it is clear

DataDynamics Active Reports entering extra spaces in long email addresses

I'm using Data Dynamics Active Reports to generate some reports on our website.
Action: User runs a report on user accounts (this contains an email field) and Exports to an excel file.
Issue: If the email is relatively long, extra white space is added in the field.
Has anyone else had this problem? If so, what did you do to fix it?
Here, I found a solution to hide blank sub report space:
Add group header and footer
Check the condition
Make Group header or footer visible false/true
After some research with DataDynamics and GrapCity I found that this is a known bug they are working on Case 00023478.
To work around it I made the TextBox larger that the email fields were bound to. It's a sucky work around but it's all we have until they fix this issue.
The issue has to do with wrapped text in a texbox that forces line breaks in the excel export.
EDIT:
The better, but still sucky, workaround is to make all of your textboxes alignment "Justify". This removes all the spaces from the text on export to excel no matter what size the box, but everything is now justified...

Resources