Live updating from a .txt file to PowerPoint textbox - vba

Quick note: I have no background/experience with VBA so will need some explanation as to what is going on.
I've wrote a Python script to pull the latest XML data from an IoT sensor (temperature readings) and store it in a text file. I would know like to get this data displaying on a PowerPoint, but this data could change during the PowerPoint, and I would like the PowerPoint slide to be able to update, receiving changes to re-display an updated version of the data.
To summarise: Currently, I have a text file with the data that needs to be read and need a VBA script to read it and place it into a textbox with live updates.
This is what I have found so far:
http://www.pptfaq.com/FAQ00124_Read_in_text_from_an_ascii_file-.htm
The above page shows a VBA script that opens a .txt file and reads it until the EOF. I am not certain how this script would output to a textbox though.
Thanks in advance.

Related

Batch alter existing PDF files

I have 1700 PDF datasheets that contain a set of text and image boxes. The underlying template of each datasheet is the same, but the contents of the boxes vary. I'd like to find a program that lets me take the modified text box contents (summarized in an excel table) and repopulate the original sheets.
I have extracted the information from the text boxes using the "Merge Data files into an excel file" under the Prepare Form tool in Adobe DC and have used a variety of =Substitute functions in excel to change the contents of the text boxes to what I want. What I would like to do now is use a program to go back to the original .PDF and overwrite the original fields. I would just run a mail merge on this normally, but I don't have access to the images anymore so the image boxes would be blank.
Alternatively I've considered using something like Pulover Macro Creator to step through the excel list and paste in the contents into every sheet, but I'm hoping that there's an existing piece of software to do this.

Visio macro to save a macro-free file

I have a series of complex charts to draw, so I have written a macro that takes a set of instructions from a CSV file and draws them appropriately. This works, but I need to manually save the produced page as a .vsdx file (i.e. without my macro code) after the fact.
What I'd like to do is specify the filename in the input file and have it produce a macro-free visio file of that name.
I've tried
Application.ActiveDocument.SaveAs filename
but this immediately generates a run-time error: "VB projects cannot be saved in macro-free files".
I understand that - I don't want my macro code in each of the (dozens of) flow charts I'm drawing. How can I suppress this error?
Thanks in advance.
If you want to have your macro(s) stored in a document file, then you'd want to have your macro generate a new document in which you draw your complex charts. But as #y4cine commented, you need to keep your code separate from your content, if you want to save your content as macro-free files.
Otherwise you may be able to set Application.AlertResponse to whatever response Visio asks interactively when you try to save a file that has a macro as a macro-free format.

Generate PowerPoint presentations with Excel sheets / charts embedded in it programatically

So what my client wants to accomplish seems pretty simple. We will have PPTX file template with a few Excel sheets embedded in it, and a few charts too.
We have created such template file. We are able to extract it, update excel files that sit in ppt/embedded directory with new ones, and pack it back.
The problem is, the display values of the tables or charts do not update automatically when such file is opened. You have to double click on a spreadsheet table or chart to trigger "edit mode". When you leave it the charts are updated.
We figured that internally, PowerPoint is doing screenshots of tables or charts, and uses it to display presentation. This is probably to allow presentation players that do not come with Excel to correctly render the presentation with embedded sheets.
Is there a way I can programatically update the screenshots of tables/charts? Is there some sort of API from Microsoft that would allow me to do that, like "MS Office API".
Maybe there is some way to have MS office configured/scripted, so I send it a file, it runs a VB script on it and returns updated value? I figured I can actually trigger update to screenshots with VB script. But I don't know if I can orchestrate Office program to do what I want.
Help? :)

How do i save Image(Jpg,Jpeg) file in excel for each cell

I want to attach a different image for different cells. SO far I am doing by attach the image via ("link"). I am facing some problem that whenever I try to send file I have to send the corrsponding path file . But sometimes its annoying that folders will be erased or moved . Can anyone give me an valuable suggestions, that I can save all my image in the file(excel) , whereas I can send only the excel sheet, when some one click the cell , corrosponding image boot from the cell(excel).
Is it possiible in excel, if it so please give me the instruction.
thanks in advance
The easiest way to do this is to save your file in older format, for example in Excel 97-2003. By default newer formats keep links, not pictures.
If you insert pictures via a macro, use something like the following:
Cells(1,1).AddPicture(FileName:="C:\1.jpg", SaveWithDocument:=True)
If you are using "insert picture" method via the insert tab in excel, within "insert picture" window you can choose "insert" at the bottom of the window. i'm not too sure how exactly it is called in English, but my translation is pretty close to what it might be.

How do I put formatting into text that I copy paste via autohotkey

I have an autohotkey script that I trigger via a hotkey. It reads data from a .txt file and then pastes the data into the active window. The active window can be a note from Evernote.
The textfile is simple unicode but I want to have colored text as a end product.
How do I get there? How do I format the text.
If it matters, the script runs on windows.