HTML table to PPT using PPtxgen - qlikview

I'm using PptxGen to create PowerPoint tabular reports of HTML generated in QlikView extension. I'm using function addSlidesForTable to pass HTML table id.
Syntax below:
pptx.addSlidesForTable("tabAutoPaging", {addHeaderToEach:true,master:'MASTER_SLIDE',options:{x:0.4, y:120}} );
The master slide is perfectly applied and the header is also printed on each slide. However, x and y position has no effect of changing the values in the statement above. Anything I'm missing here?

Provide x and y positions without the options parameter.
Your addSlidesForTable method call should be like
pptx.addSlidesForTable("tabAutoPaging1",{addHeaderToEach:true,master:'MASTER_SLIDE', x:0.5, y:3.5} })

Related

How to refer to the text of a shape in another page

I have two shapes, masterShape on the page Data and slaveShape on the page ESB. I mention that the Name & NameU of my pages are the same. I already read a lot about this (See here for example).
My goal is to make the text of slaveText equal to this of masterText.
I read a lot about referencing pages and fields, but seemingly not enough.
I start with the two shapes on the same page. When the two shapes are on the same page, I can assign a field to the slaveShape with this custom formula =SHAPETEXT(masterShape!TheText) so that it gives the expected result. Yes.
How to access this shape with a page reference?
I tried this:
=SHAPETEXT(ThePage!Softwares!TheText) -> Error in formula (and should not meet the requirements)
=SHAPETEXT(Pages[Data]!Softwares!TheText) -> Bad ShapeSheet Name
Yet this code in VBA gives the expected text:
Debug.Print ActiveDocument.Pages("Data").Shapes("Softwares").Text
Any idea to convert this VBA into a formula using =SHAPETEXT(...)?
Please use syntax with ID instead shape name. This syntax looks like
=SHAPETEXT(Pages[Data]!Sheet.740!TheText)
But you must find ID of master shape.

Replace a Picture in MS Word header with another in VBA

Using MS access I need to open a word document and change certain images within the header. Whilst I have the code to find and replace any text that I need, I do not quite understand how to replace an image keeping it to a specific width and height.
The header within the Word document is constructed using a basic table with 3 columns as depicted below. The image in the right hand column will need to change for a specific logo.
I have managed so far to add an image to the document using the following code which gives the expected result...
With WordDoc.StoryRanges(wdPrimaryHeaderStory)
.InlineShapes.AddPicture FileName:="test.jpg"
End With
I understand that this is due to me not specifying a specific location, size etc but I am struggling to find resources which would instead allow me to either remove and add a new image to the right column or just swap the images out.
EDIT 1:

Add Chart Inside a Textbox using VBA in word

I want to add a chart inside a textbox using VBA in Microsoft word.
I have tried using
ActiveDocument.InlineShapes.AddChart()
API;
with cursor inside the textbox and still it doesn't produce the desired result
Unless you specify where the chart is to be placed it will simply be added to the document. If you had looked at the help text, IntelliSense or the Object Browser you would have seen that the method takes a Range as an argument. To place the chart in a specific location the range is required.
For example:
Set shp = ActiveDocument.InlineShapes.AddChart(Range:=Selection.Range)

Insert Pictures by file path in document for hundreds of pages that match common name MS Access VBA

I have about 400 images that are in a separate directories by there name. I want to match these names with the filepath to the image attached to a report in access so the images will show up in access and I can print the report with the images included. I want to use VBA code as this is a repeating process and there are a lot of pages to insert a picture for otherwise done by hand.
I have some example data of my file paths. I have conditions.
I would like these images to show up in access so that they look like this when I export them. Here is an example. Each image from left to right will correspond to the trait 1,2,3 as shown in the table.
In access I have tried using hyperlink by I can't get it to match the Name to the name in the report like a master and child link or something in VBA might work too.
test3
Looks like this should be a two step process for you.
Add image placeholders. Insert an image where you want it on the report. Choose an image that would clearly show the image didn't load so you know when it's broken. Like a big red X.
Replace that image using an event that will load automatically as you make reports
EXAMPLE EVENT CODE:
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![Imageframe].Picture = Me![Imagepath]
End Sub
Replace the name of the Imageframe with whatever you named your placeholder image. Replace the assignment with whatever contains your image path. You should be able to add as many of these as you want.
SOURCE:
http://www.databasedev.co.uk/bound_image_report.html

How do I differentiate between placeholders (Tags, Id, Name) on a template and have the label stay once the template is used in the presentation

I am creating a custom slide template with 8 picture placeholders and 4 text placeholders. The idea is that the user would "fill-in" the template with the text and images and once a macro is run, the values of the placeholders would be collected and added to a JSON file. Ideally, two picture placeholders (big_screen_i and small_screen_i) and one text placeholder (caption_i) would be collected as one JSON object. This set would be repeated 4 times on the same slide.
Here are my problems:
1) The name of the placeholder set in the slide master view changes when more than one of the same template is used (haven't pinpointed the exact trigger). The names also change once an image is inserted into the placeholder. Locating an object by name becomes unstable.
2) Using the .type of placeholder (picture vs text) doesn't differentiate between the big_screen_i and small_screen_i.
3) Tags and keys also change or disappear when using the template more than once (because of the repeated name).
4) I am unable to group the objects because its not possible to group placeholders.
Is there a way to identify each shape/placeholder and connect it to the added content?
Note: I am using powerpoint 2016 .potm file
Thank You!