GithubHelp home page GithubHelp logo

charlesweir / wordimagesandtables Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 17 MB

Microsoft Word Plug-in to support Desktop Publishing: easy updating and positioning of figures and tables.

License: GNU General Public License v3.0

VBA 98.87% Batchfile 0.57% HTML 0.56%
vba-macros layout-algorithm microsoft-word microsoft-word-addin

wordimagesandtables's Introduction

Hi, I'm Charles Weir. I work as a researcher at Lancaster University, UK

Most of my projects here are stuff related to the needs of a researcher, but will also have other applications. I'm particularly pleased with WordImagesAndTables, which I use all the time myself when writing Word documents.

There's more about me and further links at https://charlesweir.com

wordimagesandtables's People

Contributors

charlesweir avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

wordimagesandtables's Issues

Make insert frame right size?

In New Image and New Table, rather than force the user to change the frame size, have the insertion code fit it to the column width (and perhaps adjust the image and set the frame to auto adjust its height too). Add a note in the caption, perhaps, to manually expand the frame width if it is to cross columns.

Needs marketing

Need to add social media sharing tools and requests for stars.

Replace Picture: Border lost

On Word for Mac Version 16.45:
When Replace Picture is used on an image with a border, the replaced image has no border.

Make table template not have tables

In Insert Table it's a pain to have to delete the table each time, and impossible really to use it as is. Replace the table in the template with text: [Insert or paste table here]

Lines of text not aligned in two column mode

Most magazines and Latex-based multi-column documents align the lines of text in each column.

The Word templates I've found so far don't do this. The reasons are:

  • Line spacing varies according to the content of the line (parentheses, for example, take more space). One can make spacing fixed in the style, but it's not default and it's not clear what the spacing should be (e.g. 11.3 for 10 point Times)
  • Titles aren't integer multiples of the body line height. Can fix as above.
  • Images at the top of the page aren't multiples of the line height. Can fix by setting the bottom 'Distance from Text' parameter so (frame height + bottom distance from text + a tiny bit?) = multiple of line height.

Occasional bug in Word positioning

Bug in Word formatting. If top of right hand column, centred in column, sometimes Word positions it more centred in page. Use Right relative to Margin or absolute positioning?

Probabably in function SetToFloatAt.

N.B. Waiting for suitable test document.

Undo cleanup

In Sub ButtonPressed in module FiguresAndTables, if the subroutine is exited any way but the end, the UndoRecord object remains active.

Relayout Document: Image wrongly located in top right hand column

Given a two-column layout, where there are images at the top of both left and right hand columns, sometimes Word misplaces the right hand image to be nearer the centre of the page. This messes up the layout. That can be fixed manually by moving the image back with the mouse; but the resulting misuse of space can also cause the layout of following pages to be wrong.

This appears to be a bug in MS Word. A possible workaround might be to use absolute positioning when the error occurs (how to detect it?).

TBD Test example.

Insert Table and Insert Figure Autotext Unhelpful

Mostly in 'insert table', I have an existing table to copy in. If not, it's still easier to use 'create new table' rather than modify the one in the template.

So remove the sample table, and replace with tips what to do: ensure frame is big enough before inserting table; just insert table here… Table width normally 100%. Style for table cell, table headings, etc.

Needs user-accessible version information

Perhaps if control key pressed during any command, display version dialog?

Can we detect the last update date of the template? Probably - we can get its full name (path?) using AnchoredFrame.ThisTemplate.FullName.

Error 4605 with Insert Picture on Lancaster Virtual Desktop

Insert Picture and Insert Table repeatably get an error (4605). This happens after the frame is inserted, before the reference to the caption is created.

(from debugger) It happens in AnchoredFrame.InsertCrossReferenceBesideAnchor(autotextName As String), but not at a repeatable location.

Hypothesis: It's the use of cut and paste functionality; Virtual Desktop has a weird cut popup which must affect timing and cause sections of the document to remain locked. We've seen this problem before, but then it was always the same line that failed.

Try: Replacing cut and paste with Range.formattedText = ... https://social.technet.microsoft.com/Forums/office/en-US/151112df-e4fc-447d-a13d-a4198eddf805/how-do-i-move-text-in-word-2010-in-a-macro-without-copying-and-pasting?forum=word

Make it easy to insert image

Easiest would be to have 'Select this and use Replace Picture" as instructions in the image itself.
But then the new image will be scaled the same as the template image.

So when replacing the template image (only), we don't want Replace Picture to preserve all the properties - just the width, scaling everything else accordingly. How to mark the template image as different?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.