Marco - newbie need help
Discussion Open
Hello all,
I'm totally a newbie in macro and would really appreciate if someone can help me create 3 macros that would in an entire map:
Macro 1: remove "<" and ">" from the following strings <firstname.name@domain.com>
Macro 2: create a topic with "firstname + name" and subtopic with firstname.name@domain.com
Macro 3: split into multiple topics/subtopics a list of emails addresses that are ";" separated such in the following example : name1, firstname1 <xxxxx@domain.com>;name2, firstname2 <xxxxx@domain.com>;name3, firstname3 <xxxxx@domain.com>...
Thanks a lot
hi, i tested this script myself.
the last 2 lines are useless and cause error.
ps remove these 2 lines:
' Call the Main subroutine to execute the script
Main()
as seen, when AI is partnered with correct people,
it increase productivity.
thanks
hi, i tested this script myself.
the last 2 lines are useless and cause error.
ps remove these 2 lines:
' Call the Main subroutine to execute the script
Main()
as seen, when AI is partnered with correct people,
it increase productivity.
thanks
Hello and welcome :)
If you are able to post screenshots of a map in "before" and "after" state, this would help with defining the macros.
Are you new to programming concepts, new to VBA-compatible macros, or only new to the MindManager object model?
Hello and welcome :)
If you are able to post screenshots of a map in "before" and "after" state, this would help with defining the macros.
Are you new to programming concepts, new to VBA-compatible macros, or only new to the MindManager object model?
Hi,
Is your data source a table of names and addresses that you wish to import into a MindManager map? If so, you could copy or import it into Excel (or similar spreadsheet program that can read and write Excel files) and do some simple editing there before importing the results into MindManager using the Excel Data Mapper.
You shouldn't have to do very much beforehand; a simple search and replace in Excel could remove the brackets in your first example, and you could use simple Excel formulas to concatenate the first and last names into a single cell if they are not set up that way already.
Once the list is in a two-column format with name1, firstname1 (or firstname1 name1) in the first column and xxxx@domain.com in the second and saved as an Excel file, you can use the Data Mapper feature to import the list into MindManager. In the import dialogue you can designate the first column as a topic and the second as either a subtopic, a link, or both.
Hi,
Is your data source a table of names and addresses that you wish to import into a MindManager map? If so, you could copy or import it into Excel (or similar spreadsheet program that can read and write Excel files) and do some simple editing there before importing the results into MindManager using the Excel Data Mapper.
You shouldn't have to do very much beforehand; a simple search and replace in Excel could remove the brackets in your first example, and you could use simple Excel formulas to concatenate the first and last names into a single cell if they are not set up that way already.
Once the list is in a two-column format with name1, firstname1 (or firstname1 name1) in the first column and xxxx@domain.com in the second and saved as an Excel file, you can use the Data Mapper feature to import the list into MindManager. In the import dialogue you can designate the first column as a topic and the second as either a subtopic, a link, or both.
Hi,
to delete specific text you could use the replace function
result
Hi,
to delete specific text you could use the replace function
result
I am here to show you, the light that never happened on the world before: AI
ps: indeed i am just a paid user, credits go to OpenAI and the contributors.
you just need purchase GPT4,
type:
You
for mindmanager winwrap macros, my friend wanna do this, can you help him? I'm totally a newbie in macro and would really appreciate if someone can help me create 3 macros that would in an entire map: Macro 1: remove "<" and ">" from the following strings <firstname.name@domain.com>
GPT replies:
Certainly! To create macros for MindManager using WinWrap Basic, you'll need to use the MindManager Object Model within the WinWrap Basic script environment. Below are examples of how your friend can create the macros to achieve the desired outcomes. Please note that these scripts are basic examples and might need adjustments based on the specific version of MindManager and its scripting environment.
### Macro 1: Remove "<" and ">" from Email Strings
This macro iterates through all topics in the map, checks if the topic text contains an email-like string enclosed in "<" and ">", and then removes the "<" and ">" characters.
```vb
Sub RemoveAngleBracketsFromEmails()
Dim objTopic As Topic
For Each objTopic In ActiveDocument.Range(mmRangeAllTopics)
If InStr(objTopic.Text, "<") > 0 And InStr(objTopic.Text, ">") > 0 Then
' Assuming the email is the only content in the topic
objTopic.Text = Replace(objTopic.Text, "<", "")
objTopic.Text = Replace(objTopic.Text, ">", "")
End If
Next objTopic
End Sub
```
### How to Use This Macro
1. **Open MindManager**: Launch the MindManager application.
2. **Access the Macro Editor**: Navigate to the macro editor or scripting environment. This can usually be done from the "Tools" menu, where you might find an option like "Macros" or "Scripting."
3. **Create a New Macro**: Choose to create a new macro/script. There might be a button or link to "New" or "Create."
4. **Copy and Paste the Code**: Copy the provided VBScript code into the macro editor.
5. **Save and Run the Macro**: Save the macro with a meaningful name, such as "RemoveAngleBracketsFromEmails." Then, run the macro on your active MindManager map.
Please ensure your friend follows these steps carefully and understands that running macros can modify map content. It's a good idea to make a backup of the map before running any macros.
If your friend encounters any issues or needs further customization, they might need to dive deeper into the MindManager scripting documentation or seek assistance from someone with experience in WinWrap Basic and the MindManager Object Model.
I am here to show you, the light that never happened on the world before: AI
ps: indeed i am just a paid user, credits go to OpenAI and the contributors.
you just need purchase GPT4,
type:
You
for mindmanager winwrap macros, my friend wanna do this, can you help him? I'm totally a newbie in macro and would really appreciate if someone can help me create 3 macros that would in an entire map: Macro 1: remove "<" and ">" from the following strings <firstname.name@domain.com>
GPT replies:
Certainly! To create macros for MindManager using WinWrap Basic, you'll need to use the MindManager Object Model within the WinWrap Basic script environment. Below are examples of how your friend can create the macros to achieve the desired outcomes. Please note that these scripts are basic examples and might need adjustments based on the specific version of MindManager and its scripting environment.
### Macro 1: Remove "<" and ">" from Email Strings
This macro iterates through all topics in the map, checks if the topic text contains an email-like string enclosed in "<" and ">", and then removes the "<" and ">" characters.
```vb
Sub RemoveAngleBracketsFromEmails()
Dim objTopic As Topic
For Each objTopic In ActiveDocument.Range(mmRangeAllTopics)
If InStr(objTopic.Text, "<") > 0 And InStr(objTopic.Text, ">") > 0 Then
' Assuming the email is the only content in the topic
objTopic.Text = Replace(objTopic.Text, "<", "")
objTopic.Text = Replace(objTopic.Text, ">", "")
End If
Next objTopic
End Sub
```
### How to Use This Macro
1. **Open MindManager**: Launch the MindManager application.
2. **Access the Macro Editor**: Navigate to the macro editor or scripting environment. This can usually be done from the "Tools" menu, where you might find an option like "Macros" or "Scripting."
3. **Create a New Macro**: Choose to create a new macro/script. There might be a button or link to "New" or "Create."
4. **Copy and Paste the Code**: Copy the provided VBScript code into the macro editor.
5. **Save and Run the Macro**: Save the macro with a meaningful name, such as "RemoveAngleBracketsFromEmails." Then, run the macro on your active MindManager map.
Please ensure your friend follows these steps carefully and understands that running macros can modify map content. It's a good idea to make a backup of the map before running any macros.
If your friend encounters any issues or needs further customization, they might need to dive deeper into the MindManager scripting documentation or seek assistance from someone with experience in WinWrap Basic and the MindManager Object Model.
btw, MM winwrap sometimes differ from VBA,
sometimes, you need to remove the App/Application in the code.
i didn't run this code,
but so far, it looks good.
you may try run it, and then see what error is reported.
you can feed back into GPT4 for trouble shooting, or consult experts.
btw, MM winwrap sometimes differ from VBA,
sometimes, you need to remove the App/Application in the code.
i didn't run this code,
but so far, it looks good.
you may try run it, and then see what error is reported.
you can feed back into GPT4 for trouble shooting, or consult experts.
btw, GPT4 presented the above as a function,
shd use the following script:
Sub Main()
Dim objTopic As Topic
For Each objTopic In ActiveDocument.Range(mmRangeAllTopics)
If InStr(objTopic.Text, "<") > 0 And InStr(objTopic.Text, ">") > 0 Then
' Assuming the email is the only content in the topic
objTopic.Text = Replace(objTopic.Text, "<", "")
objTopic.Text = Replace(objTopic.Text, ">", "")
End If
Next objTopic
End Sub
' Call the Main subroutine to execute the script
Main()
btw, GPT4 presented the above as a function,
shd use the following script:
Sub Main()
Dim objTopic As Topic
For Each objTopic In ActiveDocument.Range(mmRangeAllTopics)
If InStr(objTopic.Text, "<") > 0 And InStr(objTopic.Text, ">") > 0 Then
' Assuming the email is the only content in the topic
objTopic.Text = Replace(objTopic.Text, "<", "")
objTopic.Text = Replace(objTopic.Text, ">", "")
End If
Next objTopic
End Sub
' Call the Main subroutine to execute the script
Main()
@Krsto: if it's not too much to ask, would you mind asking your AI friend an additionnal script to:
so basicaly I would like a macro that would transform firstname.name@domain.com into 2 topics "firstname name" (parent topic) and the email address as a subtopic.
I'm not familiar to ChatGPT either ;-( Thanks again
@Krsto: if it's not too much to ask, would you mind asking your AI friend an additionnal script to:
so basicaly I would like a macro that would transform firstname.name@domain.com into 2 topics "firstname name" (parent topic) and the email address as a subtopic.
I'm not familiar to ChatGPT either ;-( Thanks again
---